Changeset 12182
- Timestamp:
- 2019-12-11T12:38:43+01:00 (4 years ago)
- Location:
- NEMO/branches/2019/dev_r11943_MERGE_2019
- Files:
-
- 8 deleted
- 64 edited
- 30 copied
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/dev_r11943_MERGE_2019/cfgs/AGRIF_DEMO/EXPREF/1_namelist_cfg
r11536 r12182 93 93 !----------------------------------------------------------------------- 94 94 ! ! bulk algorithm : 95 ln_NCAR = .true. ! "NCAR" algorithm (Large and Yeager 2008) 96 95 ln_NCAR = .true. ! "NCAR" algorithm (Large and Yeager 2008) 96 ln_COARE_3p0 = .false. ! "COARE 3.0" algorithm (Fairall et al. 2003) 97 ln_COARE_3p6 = .false. ! "COARE 3.6" algorithm (Edson et al. 2013) 98 ln_ECMWF = .false. ! "ECMWF" algorithm (IFS cycle 31) 99 ! 100 rn_zqt = 10. ! Air temperature & humidity reference height (m) 101 rn_zu = 10. ! Wind vector reference height (m) 102 ln_Cd_L12 = .false. ! air-ice drags = F(ice concentration) (Lupkes et al. 2012) 103 ln_Cd_L15 = .false. ! air-ice drags = F(ice concentration) (Lupkes et al. 2015) 104 rn_pfac = 1. ! multiplicative factor for precipitation (total & snow) 105 rn_efac = 1. ! multiplicative factor for evaporation (0. or 1.) 106 rn_vfac = 0. ! multiplicative factor for ocean & ice velocity used to 107 ! ! calculate the wind stress (0.=absolute or 1.=relative winds) 108 ln_skin_cs = .false. ! use the cool-skin parameterization (only available in ECMWF and COARE algorithms) !LB 109 ln_skin_wl = .false. ! use the warm-layer " " " 110 ! 111 ln_humi_sph = .true. ! humidity specified below in "sn_humi" is specific humidity [kg/kg] if .true. 112 ln_humi_dpt = .false. ! humidity specified below in "sn_humi" is dew-point temperature [K] if .true. 113 ln_humi_rlh = .false. ! humidity specified below in "sn_humi" is relative humidity [%] if .true. 114 ! 97 115 cn_dir = './' ! root directory for the bulk data location 98 116 !___________!_________________________!___________________!___________!_____________!________!___________!______________________________________!__________!_______________! … … 108 126 sn_snow = 'ncar_precip.15JUNE2009_fill', -1. , 'SNOW' , .false. , .true. , 'yearly' , 'weights_core_orca2_bilinear_noc.nc' , '' , '' 109 127 sn_slp = 'slp.15JUNE2009_fill' , 6. , 'SLP' , .false. , .true. , 'yearly' , 'weights_core_orca2_bilinear_noc.nc' , '' , '' 110 sn_tdif = 'taudif_core' , 24. , 'taudif' , .false. , .true. , 'yearly' , 'weights_core_orca2_bilinear_noc.nc' , '' , ''111 128 / 112 129 !----------------------------------------------------------------------- -
NEMO/branches/2019/dev_r11943_MERGE_2019/cfgs/AGRIF_DEMO/EXPREF/2_namelist_cfg
r11536 r12182 89 89 !----------------------------------------------------------------------- 90 90 ! ! bulk algorithm : 91 ln_NCAR = .true. ! "NCAR" algorithm (Large and Yeager 2008) 92 91 ln_NCAR = .true. ! "NCAR" algorithm (Large and Yeager 2008) 92 ln_COARE_3p0 = .false. ! "COARE 3.0" algorithm (Fairall et al. 2003) 93 ln_COARE_3p6 = .false. ! "COARE 3.6" algorithm (Edson et al. 2013) 94 ln_ECMWF = .false. ! "ECMWF" algorithm (IFS cycle 31) 95 ! 96 rn_zqt = 10. ! Air temperature & humidity reference height (m) 97 rn_zu = 10. ! Wind vector reference height (m) 98 ln_Cd_L12 = .false. ! air-ice drags = F(ice concentration) (Lupkes et al. 2012) 99 ln_Cd_L15 = .false. ! air-ice drags = F(ice concentration) (Lupkes et al. 2015) 100 rn_pfac = 1. ! multiplicative factor for precipitation (total & snow) 101 rn_efac = 1. ! multiplicative factor for evaporation (0. or 1.) 102 rn_vfac = 0. ! multiplicative factor for ocean & ice velocity used to 103 ! ! calculate the wind stress (0.=absolute or 1.=relative winds) 104 ln_skin_cs = .false. ! use the cool-skin parameterization (only available in ECMWF and COARE algorithms) !LB 105 ln_skin_wl = .false. ! use the warm-layer " " " 106 ! 107 ln_humi_sph = .true. ! humidity specified below in "sn_humi" is specific humidity [kg/kg] if .true. 108 ln_humi_dpt = .false. ! humidity specified below in "sn_humi" is dew-point temperature [K] if .true. 109 ln_humi_rlh = .false. ! humidity specified below in "sn_humi" is relative humidity [%] if .true. 110 ! 93 111 cn_dir = './' ! root directory for the bulk data location 94 112 !___________!_________________________!___________________!___________!_____________!________!___________!______________________________________!__________!_______________! … … 104 122 sn_snow = 'ncar_precip.15JUNE2009_fill', -1. , 'SNOW' , .false. , .true. , 'yearly' , 'weights_core2_nordic1_bilin.nc' , '' , '' 105 123 sn_slp = 'slp.15JUNE2009_fill' , 6. , 'SLP' , .false. , .true. , 'yearly' , 'weights_core2_nordic1_bilin.nc' , '' , '' 106 sn_tdif = 'taudif_core' , 24. , 'taudif' , .false. , .true. , 'yearly' , 'weights_core2_nordic1_bilin.nc' , '' , ''107 124 108 125 / -
NEMO/branches/2019/dev_r11943_MERGE_2019/cfgs/AGRIF_DEMO/EXPREF/2_namelist_ice_ref
r9575 r12182 1 link 1_namelist_ice_ref1 link ../../SHARED/namelist_ice_ref -
NEMO/branches/2019/dev_r11943_MERGE_2019/cfgs/AGRIF_DEMO/EXPREF/2_namelist_ref
r9464 r12182 1 link 1_namelist_ref1 link ../../SHARED/namelist_ref -
NEMO/branches/2019/dev_r11943_MERGE_2019/cfgs/AGRIF_DEMO/EXPREF/3_namelist_cfg
r11536 r12182 104 104 sn_snow = 'ncar_precip.15JUNE2009_fill', -1. , 'SNOW' , .false. , .true. , 'yearly' , 'weights_core2_nordic2_bilin.nc' , '' , '' 105 105 sn_slp = 'slp.15JUNE2009_fill' , 6. , 'SLP' , .false. , .true. , 'yearly' , 'weights_core2_nordic2_bilin.nc' , '' , '' 106 sn_tdif = 'taudif_core' , 24. , 'taudif' , .false. , .true. , 'yearly' , 'weights_core2_nordic2_bilin.nc' , '' , ''107 106 108 107 / -
NEMO/branches/2019/dev_r11943_MERGE_2019/cfgs/AGRIF_DEMO/EXPREF/namelist_cfg
r11536 r12182 93 93 !----------------------------------------------------------------------- 94 94 ! ! bulk algorithm : 95 ln_NCAR = .true. ! "NCAR" algorithm (Large and Yeager 2008) 96 95 ln_NCAR = .true. ! "NCAR" algorithm (Large and Yeager 2008) 96 ln_COARE_3p0 = .false. ! "COARE 3.0" algorithm (Fairall et al. 2003) 97 ln_COARE_3p6 = .false. ! "COARE 3.6" algorithm (Edson et al. 2013) 98 ln_ECMWF = .false. ! "ECMWF" algorithm (IFS cycle 31) 99 ! 100 rn_zqt = 10. ! Air temperature & humidity reference height (m) 101 rn_zu = 10. ! Wind vector reference height (m) 102 ln_Cd_L12 = .false. ! air-ice drags = F(ice concentration) (Lupkes et al. 2012) 103 ln_Cd_L15 = .false. ! air-ice drags = F(ice concentration) (Lupkes et al. 2015) 104 rn_pfac = 1. ! multiplicative factor for precipitation (total & snow) 105 rn_efac = 1. ! multiplicative factor for evaporation (0. or 1.) 106 rn_vfac = 0. ! multiplicative factor for ocean & ice velocity used to 107 ! ! calculate the wind stress (0.=absolute or 1.=relative winds) 108 ln_skin_cs = .false. ! use the cool-skin parameterization (only available in ECMWF and COARE algorithms) !LB 109 ln_skin_wl = .false. ! use the warm-layer " " " 110 ! 111 ln_humi_sph = .true. ! humidity specified below in "sn_humi" is specific humidity [kg/kg] if .true. 112 ln_humi_dpt = .false. ! humidity specified below in "sn_humi" is dew-point temperature [K] if .true. 113 ln_humi_rlh = .false. ! humidity specified below in "sn_humi" is relative humidity [%] if .true. 114 ! 97 115 cn_dir = './' ! root directory for the bulk data location 98 116 !___________!_________________________!___________________!___________!_____________!________!___________!______________________________________!__________!_______________! … … 108 126 sn_snow = 'ncar_precip.15JUNE2009_fill', -1. , 'SNOW' , .false. , .true. , 'yearly' , 'weights_core_orca2_bilinear_noc.nc' , '' , '' 109 127 sn_slp = 'slp.15JUNE2009_fill' , 6. , 'SLP' , .false. , .true. , 'yearly' , 'weights_core_orca2_bilinear_noc.nc' , '' , '' 110 sn_tdif = 'taudif_core' , 24. , 'taudif' , .false. , .true. , 'yearly' , 'weights_core_orca2_bilinear_noc.nc' , '' , ''111 128 / 112 129 !----------------------------------------------------------------------- -
NEMO/branches/2019/dev_r11943_MERGE_2019/cfgs/C1D_PAPA/EXPREF/namelist_cfg
r11536 r12182 159 159 sn_snow = 'forcing_C1D_PAPA' , 3. , 'sososnow', .false. , .false. , 'yearly' , '' , '' , '' 160 160 sn_slp = 'forcing_C1D_PAPA' , 3. , 'somslpre', .true. , .false. , 'yearly' , '' , '' , '' 161 sn_tdif = 'forcing_C1D_PAPA' , 24. , 'taudif' , .false. , .false. , 'yearly' , '' , '' , ''162 161 163 162 / -
NEMO/branches/2019/dev_r11943_MERGE_2019/cfgs/ORCA2_ICE_PISCES/EXPREF/namelist_cfg
r11536 r12182 118 118 sn_snow = 'ncar_precip.15JUNE2009_fill', -1. , 'SNOW' , .false. , .true. , 'yearly' , 'weights_core_orca2_bilinear_noc.nc' , '' , '' 119 119 sn_slp = 'slp.15JUNE2009_fill' , 6. , 'SLP' , .false. , .true. , 'yearly' , 'weights_core_orca2_bilinear_noc.nc' , '' , '' 120 sn_tdif = 'taudif_core' , 24. , 'taudif' , .false. , .true. , 'yearly' , 'weights_core_orca2_bilinear_noc.nc' , '' , ''121 120 / 122 121 !----------------------------------------------------------------------- -
NEMO/branches/2019/dev_r11943_MERGE_2019/cfgs/ORCA2_SAS_ICE/EXPREF/namelist_cfg
r11536 r12182 64 64 &namsbc_blk ! namsbc_blk generic Bulk formula (ln_blk =T) 65 65 !----------------------------------------------------------------------- 66 ln_NCAR = .true. ! "NCAR" algorithm (Large and Yeager 2008) 67 66 ! ! bulk algorithm : 67 ln_NCAR = .true. ! "NCAR" algorithm (Large and Yeager 2008) 68 ln_COARE_3p0 = .false. ! "COARE 3.0" algorithm (Fairall et al. 2003) 69 ln_COARE_3p6 = .false. ! "COARE 3.6" algorithm (Edson et al. 2013) 70 ln_ECMWF = .false. ! "ECMWF" algorithm (IFS cycle 31) 71 ! 72 rn_zqt = 10. ! Air temperature & humidity reference height (m) 73 rn_zu = 10. ! Wind vector reference height (m) 74 ln_Cd_L12 = .false. ! air-ice drags = F(ice concentration) (Lupkes et al. 2012) 75 ln_Cd_L15 = .false. ! air-ice drags = F(ice concentration) (Lupkes et al. 2015) 76 rn_pfac = 1. ! multiplicative factor for precipitation (total & snow) 77 rn_efac = 1. ! multiplicative factor for evaporation (0. or 1.) 78 rn_vfac = 0. ! multiplicative factor for ocean & ice velocity used to 79 ! ! calculate the wind stress (0.=absolute or 1.=relative winds) 80 ln_skin_cs = .false. ! use the cool-skin parameterization (only available in ECMWF and COARE algorithms) !LB 81 ln_skin_wl = .false. ! use the warm-layer " " " 82 ! 83 ln_humi_sph = .true. ! humidity specified below in "sn_humi" is specific humidity [kg/kg] if .true. 84 ln_humi_dpt = .false. ! humidity specified below in "sn_humi" is dew-point temperature [K] if .true. 85 ln_humi_rlh = .false. ! humidity specified below in "sn_humi" is relative humidity [%] if .true. 86 ! 68 87 cn_dir = './' ! root directory for the bulk data location 69 88 !___________!_________________________!___________________!___________!_____________!________!___________!______________________________________!__________!_______________! … … 79 98 sn_snow = 'ncar_precip.15JUNE2009_fill', -1. , 'SNOW' , .false. , .true. , 'yearly' , 'weights_core_orca2_bilinear_noc.nc' , '' , '' 80 99 sn_slp = 'slp.15JUNE2009_fill' , 6. , 'SLP' , .false. , .true. , 'yearly' , 'weights_core_orca2_bilinear_noc.nc' , '' , '' 81 sn_tdif = 'taudif_core' , 24. , 'taudif' , .false. , .true. , 'yearly' , 'weights_core_orca2_bilinear_noc.nc' , '' , ''82 100 / 83 101 !----------------------------------------------------------------------- -
NEMO/branches/2019/dev_r11943_MERGE_2019/cfgs/SHARED/field_def_nemo-ice.xml
r11575 r12182 92 92 <field id="qemp_ice" long_name="Downward Heat Flux from E-P over ice" unit="W/m2" /> 93 93 <field id="albedo" long_name="Mean albedo over sea ice and ocean" unit="" /> 94 <field id="Cd_ice" long_name="Momentum turbulent exchange coefficient" unit="" /> 95 <field id="Ch_ice" long_name="Heat turbulent exchange coefficient" unit="" /> 94 96 95 97 <!-- trends --> -
NEMO/branches/2019/dev_r11943_MERGE_2019/cfgs/SHARED/field_def_nemo-oce.xml
r12150 r12182 32 32 <field id="ahmt_3d" long_name=" 3D t-eddy viscosity coefficient" unit="m2/s or m4/s" grid_ref="grid_T_3D"/> 33 33 34 <field id="sst" long_name="sea surface temperature" standard_name="sea_surface_temperature" unit="degC" /> 34 <field id="sst" long_name="Bulk sea surface temperature" standard_name="bulk_sea_surface_temperature" unit="degC" /> 35 <field id="t_skin" long_name="Skin temperature aka SSST" standard_name="skin_temperature" unit="degC" /> 35 36 <field id="sst2" long_name="square of sea surface temperature" standard_name="square_of_sea_surface_temperature" unit="degC2" > sst * sst </field > 36 37 <field id="sstmax" long_name="max of sea surface temperature" field_ref="sst" operation="maximum" /> … … 297 298 298 299 <!-- *_oce variables available with ln_blk_clio or ln_blk_core --> 300 <field id="rho_air" long_name="Air density at 10m above sea surface" standard_name="rho_air_10m" unit="kg/m3" /> 301 <field id="dt_skin" long_name="SSST-SST temperature difference" standard_name="SSST-SST" unit="K" /> 299 302 <field id="qlw_oce" long_name="Longwave Downward Heat Flux over open ocean" standard_name="surface_net_downward_longwave_flux" unit="W/m2" /> 300 303 <field id="qsb_oce" long_name="Sensible Downward Heat Flux over open ocean" standard_name="surface_downward_sensible_heat_flux" unit="W/m2" /> 301 304 <field id="qla_oce" long_name="Latent Downward Heat Flux over open ocean" standard_name="surface_downward_latent_heat_flux" unit="W/m2" /> 305 <field id="evap_oce" long_name="Evaporation over open ocean" standard_name="evaporation" unit="kg/m2/s" /> 302 306 <field id="qt_oce" long_name="total flux at ocean surface" standard_name="surface_downward_heat_flux_in_sea_water" unit="W/m2" /> 303 307 <field id="qsr_oce" long_name="solar heat flux at ocean surface" standard_name="net_downward_shortwave_flux_at_sea_water_surface" unit="W/m2" /> … … 360 364 361 365 </field_group> <!-- SBC --> 362 366 367 <!-- ABL --> 368 <field_group id="ABL" > <!-- time step automaticaly defined based on nn_fsbc --> 369 370 <!-- variables available with ABL on atmospheric T grid--> 371 <field_group id="grid_ABL3D" grid_ref="grid_TA_3D" > 372 <field id="u_abl" long_name="ABL i-horizontal velocity" standard_name="abl_x_velocity" unit="m/s" /> 373 <field id="v_abl" long_name="ABL j-horizontal velocity" standard_name="abl_y_velocity" unit="m/s" /> 374 <field id="t_abl" long_name="ABL potential temperature" standard_name="abl_theta" unit="K" /> 375 <field id="q_abl" long_name="ABL specific humidity" standard_name="abl_qspe" unit="kg/kg" /> 376 <!-- debug (to be removed) --> 377 <field id="u_dta" long_name="DTA i-horizontal velocity" standard_name="dta_x_velocity" unit="m/s" /> 378 <field id="v_dta" long_name="DTA j-horizontal velocity" standard_name="dta_y_velocity" unit="m/s" /> 379 <field id="t_dta" long_name="DTA potential temperature" standard_name="dta_theta" unit="K" /> 380 <field id="q_dta" long_name="DTA specific humidity" standard_name="dta_qspe" unit="kg/kg" /> 381 <field id="coeft" long_name="ABL nudging coefficient" standard_name="coeft" unit="" /> 382 <field id="tke_abl" long_name="ABL turbulent kinetic energy" standard_name="abl_tke" unit="m2/s2" /> 383 <field id="avm_abl" long_name="ABL turbulent viscosity" standard_name="abl_avm" unit="m2/s" /> 384 <field id="avt_abl" long_name="ABL turbulent diffusivity" standard_name="abl_avt" unit="m2/s" /> 385 <field id="mxl_abl" long_name="ABL mixing length" standard_name="abl_mxl" unit="m" /> 386 </field_group> 387 388 <field_group id="grid_ABL2D" grid_ref="grid_TA_2D" > 389 <field id="pblh" long_name="ABL height" standard_name="abl_height" unit="m" /> 390 <field id="uz1_abl" long_name="ABL i-horizontal velocity" standard_name="abl_x_velocity" unit="m/s" /> 391 <field id="vz1_abl" long_name="ABL j-horizontal velocity" standard_name="abl_y_velocity" unit="m/s" /> 392 <field id="uvz1_abl" long_name="ABL wind speed module" standard_name="abl_wind_speed" unit="m/s" > sqrt( uz1_abl^2 + vz1_abl^2 ) </field> 393 <field id="tz1_abl" long_name="ABL potential temperature" standard_name="abl_theta" unit="K" /> 394 <field id="qz1_abl" long_name="ABL specific humidity" standard_name="abl_qspe" unit="kg/kg" /> 395 <field id="uz1_dta" long_name="DTA i-horizontal velocity" standard_name="dta_x_velocity" unit="m/s" /> 396 <field id="vz1_dta" long_name="DTA j-horizontal velocity" standard_name="dta_y_velocity" unit="m/s" /> 397 <field id="uvz1_dta" long_name="DTA wind speed module" standard_name="dta_wind_speed" unit="m/s" > sqrt( uz1_dta^2 + vz1_dta^2 ) </field> 398 <field id="tz1_dta" long_name="DTA potential temperature" standard_name="dta_theta" unit="K" /> 399 <field id="qz1_dta" long_name="DTA specific humidity" standard_name="dta_qspe" unit="kg/kg" /> 400 <!-- debug (to be removed) --> 401 <field id="uz1_geo" long_name="GEO i-horizontal velocity" standard_name="geo_x_velocity" unit="m/s" /> 402 <field id="vz1_geo" long_name="GEO j-horizontal velocity" standard_name="geo_y_velocity" unit="m/s" /> 403 <field id="uvz1_geo" long_name="GEO wind speed module" standard_name="geo_wind_speed" unit="m/s" > sqrt( uz1_geo^2 + vz1_geo^2 ) </field> 404 </field_group> 405 406 </field_group> <!-- ABL --> 407 408 363 409 <!-- U grid --> 364 410 … … 375 421 <field id="uocet" long_name="ocean transport along i-axis times temperature (CRS)" unit="degC*m/s" grid_ref="grid_U_3D" /> 376 422 <field id="uoces" long_name="ocean transport along i-axis times salinity (CRS)" unit="1e-3*m/s" grid_ref="grid_U_3D" /> 423 <field id="ssuww" long_name="ocean surface wind work along i-axis" standard_name="surface_x_wind_work" unit="N/m*s" > utau * ssu </field> 377 424 378 425 <!-- u-eddy diffusivity coefficients (available if ln_traldf_OFF=F) --> … … 429 476 <field id="vocet" long_name="ocean transport along j-axis times temperature (CRS)" unit="degC*m/s" grid_ref="grid_V_3D" /> 430 477 <field id="voces" long_name="ocean transport along j-axis times salinity (CRS)" unit="1e-3*m/s" grid_ref="grid_V_3D" /> 478 <field id="ssvww" long_name="ocean surface wind work along j-axis" standard_name="surface_y_wind_work" unit="N/m*s" > vtau * ssv </field> 431 479 432 480 <!-- v-eddy diffusivity coefficients (available if ln_traldf_OFF=F) --> -
NEMO/branches/2019/dev_r11943_MERGE_2019/cfgs/SHARED/grid_def_nemo.xml
r11536 r12182 58 58 </grid> 59 59 60 <!-- ABL grid definition --> 61 <grid id="grid_TA_2D"> 62 <domain domain_ref="grid_T" /> 63 </grid> 64 <grid id="grid_TA_3D"> 65 <domain domain_ref="grid_T" /> 66 <axis id="ght_abl" /> 67 </grid> 68 <grid id="grid_WA_3D"> 69 <domain domain_ref="grid_T" /> 70 <axis id="ghw_abl" /> 71 </grid> 72 <!-- --> 73 60 74 </grid_definition> 61 75 -
NEMO/branches/2019/dev_r11943_MERGE_2019/cfgs/SHARED/namelist_ice_ref
r12145 r12182 1 1 !!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 2 !! SI3 namelist:2 !! SI3 Reference namelist: 3 3 !! 1 - Generic parameters (nampar) 4 4 !! 2 - Ice thickness discretization (namitd) … … 68 68 ln_str_H79 = .true. ! ice strength param.: Hibler_79 => P = pstar*<h>*exp(-c_rhg*A) 69 69 rn_pstar = 2.0e+04 ! ice strength thickness parameter [N/m2] 70 rn_crhg = 20.0! ice strength conc. parameter (-)70 rn_crhg = 20.0 ! ice strength conc. parameter (-) 71 71 ! -- ice_rdgrft -- ! 72 72 rn_csrdg = 0.5 ! fraction of shearing energy contributing to ridging -
NEMO/branches/2019/dev_r11943_MERGE_2019/cfgs/SHARED/namelist_ref
r12150 r12182 64 64 ln_clobber = .true. ! clobber (overwrite) an existing file 65 65 nn_chunksz = 0 ! chunksize (bytes) for NetCDF file (works only with iom_nf90 routines) 66 ln_xios_read = . FALSE. ! use XIOS to read restart file (only for a single file restart)66 ln_xios_read = .false. ! use XIOS to read restart file (only for a single file restart) 67 67 nn_wxios = 0 ! use XIOS to write restart file 0 - no, 1 - single file output, 2 - multiple file output 68 68 / … … 115 115 ln_tsd_init = .false. ! ocean initialisation 116 116 ln_tsd_dmp = .false. ! T-S restoring (see namtra_dmp) 117 117 118 118 cn_dir = './' ! root directory for the T-S data location 119 119 !___________!_________________________!___________________!___________!_____________!________!___________!__________________!__________!_______________! … … 202 202 nn_fsbc = 2 ! frequency of SBC module call 203 203 ! ! (control sea-ice & iceberg model call) 204 ! Type of air-sea fluxes 204 ! Type of air-sea fluxes 205 205 ln_usr = .false. ! user defined formulation (T => check usrdef_sbc) 206 206 ln_flx = .false. ! flux formulation (T => fill namsbc_flx ) 207 207 ln_blk = .false. ! Bulk formulation (T => fill namsbc_blk ) 208 ln_abl = .false. ! ABL formulation (T => fill namsbc_abl ) 208 209 ! ! Type of coupling (Ocean/Ice/Atmosphere) : 209 210 ln_cpl = .false. ! atmosphere coupled formulation ( requires key_oasis3 ) … … 212 213 ! ! =0 no opa-sas OASIS coupling: default single executable config. 213 214 ! ! =1 opa-sas OASIS coupling: multi executable config., OPA component 214 ! ! =2 opa-sas OASIS coupling: multi executable config., SAS component 215 ! ! =2 opa-sas OASIS coupling: multi executable config., SAS component 215 216 ! Sea-ice : 216 nn_ice = 0 ! =0 no ice boundary condition 217 nn_ice = 0 ! =0 no ice boundary condition 217 218 ! ! =1 use observed ice-cover ( => fill namsbc_iif ) 218 219 ! ! =2 or 3 automatically for SI3 or CICE ("key_si3" or "key_cice") … … 220 221 ln_ice_embd = .false. ! =T embedded sea-ice (pressure + mass and salt exchanges) 221 222 ! ! =F levitating ice (no pressure, mass and salt exchanges) 222 ! Misc. options of sbc : 223 ! Misc. options of sbc : 223 224 ln_traqsr = .false. ! Light penetration in the ocean (T => fill namtra_qsr) 224 225 ln_dm2dc = .false. ! daily mean to diurnal cycle on short wave … … 231 232 ln_wave = .false. ! Activate coupling with wave (T => fill namsbc_wave) 232 233 ln_cdgw = .false. ! Neutral drag coefficient read from wave model (T => ln_wave=.true. & fill namsbc_wave) 233 ln_sdw = .false. ! Read 2D Surf Stokes Drift & Computation of 3D stokes drift (T => ln_wave=.true. & fill namsbc_wave) 234 ln_sdw = .false. ! Read 2D Surf Stokes Drift & Computation of 3D stokes drift (T => ln_wave=.true. & fill namsbc_wave) 234 235 nn_sdrift = 0 ! Parameterization for the calculation of 3D-Stokes drift from the surface Stokes drift 235 236 ! ! = 0 Breivik 2015 parameterization: v_z=v_0*[exp(2*k*z)/(1-8*k*z)] … … 256 257 / 257 258 !----------------------------------------------------------------------- 258 &namsbc_blk ! namsbc_blk generic Bulk formula 259 &namsbc_blk ! namsbc_blk generic Bulk formula (ln_blk =T) 259 260 !----------------------------------------------------------------------- 260 261 ! ! bulk algorithm : 261 ln_NCAR = .false.! "NCAR" algorithm (Large and Yeager 2008)262 ln_NCAR = .true. ! "NCAR" algorithm (Large and Yeager 2008) 262 263 ln_COARE_3p0 = .false. ! "COARE 3.0" algorithm (Fairall et al. 2003) 263 ln_COARE_3p 5 = .false. ! "COARE 3.5" algorithm (Edson et al. 2013)264 ln_ECMWF = .false. ! "ECMWF" algorithm (IFS cycle 31)264 ln_COARE_3p6 = .false. ! "COARE 3.6" algorithm (Edson et al. 2013) 265 ln_ECMWF = .false. ! "ECMWF" algorithm (IFS cycle 45r1) 265 266 ! 266 rn_zqt = 10. ! Air temperature & humidity reference height (m) 267 rn_zu = 10. ! Wind vector reference height (m) 268 ln_Cd_L12 = .false. ! air-ice drags = F(ice concentration) (Lupkes et al. 2012) 269 ln_Cd_L15 = .false. ! air-ice drags = F(ice concentration) (Lupkes et al. 2015) 270 ln_taudif = .false. ! HF tau contribution: use "mean of stress module - module of the mean stress" data 271 rn_pfac = 1. ! multiplicative factor for precipitation (total & snow) 272 rn_efac = 1. ! multiplicative factor for evaporation (0. or 1.) 273 rn_vfac = 0. ! multiplicative factor for ocean & ice velocity used to 274 ! ! calculate the wind stress (0.=absolute or 1.=relative winds) 275 267 rn_zqt = 10. ! Air temperature & humidity reference height (m) 268 rn_zu = 10. ! Wind vector reference height (m) 269 ln_Cd_L12 = .false. ! air-ice drags = F(ice conc.) (Lupkes et al. 2012) 270 ln_Cd_L15 = .false. ! air-ice drags = F(ice conc.) (Lupkes et al. 2015) 271 ! ! - module of the mean stress" data 272 rn_pfac = 1. ! multipl. factor for precipitation (total & snow) 273 rn_efac = 1. ! multipl. factor for evaporation (0. or 1.) 274 rn_vfac = 0. ! multipl. factor for ocean & ice velocity 275 ! ! used to calculate the wind stress 276 ! ! (0. => absolute or 1. => relative winds) 277 ln_skin_cs = .false. ! use the cool-skin parameterization 278 ln_skin_wl = .false. ! use the warm-layer parameterization 279 ! ! ==> only available in ECMWF and COARE algorithms 280 ln_humi_sph = .true. ! humidity "sn_humi" is specific humidity [kg/kg] 281 ln_humi_dpt = .false. ! humidity "sn_humi" is dew-point temperature [K] 282 ln_humi_rlh = .false. ! humidity "sn_humi" is relative humidity [%] 283 ! 276 284 cn_dir = './' ! root directory for the bulk data location 277 285 !___________!_________________________!___________________!___________!_____________!________!___________!______________________________________!__________!_______________! … … 284 292 sn_tair = 't_10.15JUNE2009_fill' , 6. , 'T_10_MOD', .false. , .true. , 'yearly' , 'weights_core_orca2_bilinear_noc.nc' , '' , '' 285 293 sn_humi = 'q_10.15JUNE2009_fill' , 6. , 'Q_10_MOD', .false. , .true. , 'yearly' , 'weights_core_orca2_bilinear_noc.nc' , '' , '' 294 sn_hpgi = 'NONE' , 24. , 'uhpg' , .false. , .false., 'monthly' , 'weights_ERAI3D_F128_2_ORCA2_bicubic', 'UG' , '' 295 sn_hpgj = 'NONE' , 24. , 'vhpg' , .false. , .false., 'monthly' , 'weights_ERAI3D_F128_2_ORCA2_bicubic', 'VG' , '' 286 296 sn_prec = 'ncar_precip.15JUNE2009_fill', -1. , 'PRC_MOD1', .false. , .true. , 'yearly' , 'weights_core_orca2_bilinear_noc.nc' , '' , '' 287 297 sn_snow = 'ncar_precip.15JUNE2009_fill', -1. , 'SNOW' , .false. , .true. , 'yearly' , 'weights_core_orca2_bilinear_noc.nc' , '' , '' 288 298 sn_slp = 'slp.15JUNE2009_fill' , 6. , 'SLP' , .false. , .true. , 'yearly' , 'weights_core_orca2_bilinear_noc.nc' , '' , '' 289 sn_tdif = 'taudif_core' , 24 , 'taudif' , .false. , .true. , 'yearly' , 'weights_core_orca2_bilinear_noc.nc' , '' , '' 299 / 300 !----------------------------------------------------------------------- 301 &namsbc_abl ! Atmospheric Boundary Layer formulation (ln_abl = T) 302 !----------------------------------------------------------------------- 303 cn_dir = './' ! root directory for the location of the ABL grid file 304 cn_dom = 'dom_cfg_abl.nc' 305 306 cn_ablrst_in = "restart_abl" ! suffix of abl restart name (input) 307 cn_ablrst_out = "restart_abl" ! suffix of abl restart name (output) 308 cn_ablrst_indir = "." ! directory to read input abl restarts 309 cn_ablrst_outdir = "." ! directory to write output abl restarts 310 311 ln_hpgls_frc = .false. 312 ln_geos_winds = .false. 313 nn_dyn_restore = 2 ! restoring option for dynamical ABL variables: = 0 no restoring 314 ! = 1 equatorial restoring 315 ! = 2 global restoring 316 rn_ldyn_min = 4.5 ! magnitude of the nudging on ABL dynamics at the bottom of the ABL [hour] 317 rn_ldyn_max = 1.5 ! magnitude of the nudging on ABL dynamics at the top of the ABL [hour] 318 rn_ltra_min = 4.5 ! magnitude of the nudging on ABL tracers at the bottom of the ABL [hour] 319 rn_ltra_max = 1.5 ! magnitude of the nudging on ABL tracers at the top of the ABL [hour] 320 nn_amxl = 0 ! mixing length: = 0 Deardorff 80 length-scale 321 ! = 1 length-scale based on the distance to the PBL height 322 ! = 2 Bougeault & Lacarrere 89 length-scale 323 rn_Cm = 0.0667 ! 0.126 in MesoNH 324 rn_Ct = 0.1667 ! 0.143 in MesoNH 325 rn_Ce = 0.4 ! 0.4 in MesoNH 326 rn_Ceps = 0.7 ! 0.85 in MesoNH 327 rn_Rod = 0.15 ! c0 in RMCA17 mixing length formulation (not yet implemented) 328 rn_Ric = 0.139 ! Critical Richardson number (to compute PBL height and diffusivities) 290 329 / 291 330 !----------------------------------------------------------------------- … … 381 420 nn_chldta = 0 ! RGB : Chl data (=1) or cst value (=0) 382 421 rn_si1 = 23.0 ! 2BD : longest depth of extinction 383 422 384 423 cn_dir = './' ! root directory for the chlorophyl data location 385 424 !___________!_________________________!___________________!___________!_____________!________!___________!__________________!__________!_______________! … … 599 638 !----------------------------------------------------------------------- 600 639 ln_tide = .false. ! Activate tides 601 ln_tide_pot = . true.! use tidal potential forcing640 ln_tide_pot = .false. ! use tidal potential forcing 602 641 ln_scal_load = .false. ! Use scalar approximation for 603 642 rn_scal_load = 0.094 ! load potential 604 643 ln_read_load = .false. ! Or read load potential from file 605 644 cn_tide_load = 'tide_LOAD_grid_T.nc' ! filename for load potential 606 ! 645 ! 607 646 ln_tide_ramp = .false. ! Use linear ramp for tides at startup 608 647 rdttideramp = 0. ! ramp duration in days … … 683 722 filtide = 'bdydta/amm12_bdytide_' ! file name root of tidal forcing files 684 723 ln_bdytide_2ddta = .false. ! 685 ln_bdytide_conj = .false. ! 724 ln_bdytide_conj = .false. ! 686 725 / 687 726 … … 710 749 !----------------------------------------------------------------------- 711 750 rn_Cd0 = 1.e-3 ! drag coefficient [-] 712 rn_Uc0 = 0.4 ! ref. velocity [m/s] (linear drag=Cd0*Uc0) 751 rn_Uc0 = 0.4 ! ref. velocity [m/s] (linear drag=Cd0*Uc0) 713 752 rn_Cdmax = 0.1 ! drag value maximum [-] (logarithmic drag) 714 753 rn_ke0 = 2.5e-3 ! background kinetic energy [m2/s2] (non-linear cases) … … 721 760 !----------------------------------------------------------------------- 722 761 rn_Cd0 = 1.e-3 ! drag coefficient [-] 723 rn_Uc0 = 0.4 ! ref. velocity [m/s] (linear drag=Cd0*Uc0) 762 rn_Uc0 = 0.4 ! ref. velocity [m/s] (linear drag=Cd0*Uc0) 724 763 rn_Cdmax = 0.1 ! drag value maximum [-] (logarithmic drag) 725 764 rn_ke0 = 2.5e-3 ! background kinetic energy [m2/s2] (non-linear cases) … … 788 827 nn_cen_v = 4 ! =2/4, vertical 2nd order CEN / 4th order COMPACT 789 828 ln_traadv_fct = .false. ! FCT scheme 790 nn_fct_h = 2 ! =2/4, horizontal 2nd / 4th order 791 nn_fct_v = 2 ! =2/4, vertical 2nd / COMPACT 4th order 829 nn_fct_h = 2 ! =2/4, horizontal 2nd / 4th order 830 nn_fct_v = 2 ! =2/4, vertical 2nd / COMPACT 4th order 792 831 ln_traadv_mus = .false. ! MUSCL scheme 793 832 ln_mus_ups = .false. ! use upstream scheme near river mouths … … 810 849 ln_traldf_triad = .false. ! iso-neutral (triad operator) 811 850 ! 812 ! ! iso-neutral options: 851 ! ! iso-neutral options: 813 852 ln_traldf_msc = .false. ! Method of Stabilizing Correction (both operators) 814 853 rn_slpmax = 0.01 ! slope limit (both operators) … … 820 859 nn_aht_ijk_t = 0 ! space/time variation of eddy coefficient: 821 860 ! ! =-20 (=-30) read in eddy_diffusivity_2D.nc (..._3D.nc) file 822 ! ! = 0 constant 823 ! ! = 10 F(k) =ldf_c1d 824 ! ! = 20 F(i,j) =ldf_c2d 861 ! ! = 0 constant 862 ! ! = 10 F(k) =ldf_c1d 863 ! ! = 20 F(i,j) =ldf_c2d 825 864 ! ! = 21 F(i,j,t) =Treguier et al. JPO 1997 formulation 826 865 ! ! = 30 F(i,j,k) =ldf_c2d * ldf_c1d 827 866 ! ! = 31 F(i,j,k,t)=F(local velocity and grid-spacing) 828 ! ! time invariant coefficients: aht0 = 1/2 Ud*Ld (lap case) 867 ! ! time invariant coefficients: aht0 = 1/2 Ud*Ld (lap case) 829 868 ! ! or = 1/12 Ud*Ld^3 (blp case) 830 869 rn_Ud = 0.01 ! lateral diffusive velocity [m/s] (nn_aht_ijk_t= 0, 10, 20, 30) … … 852 891 nn_aei_ijk_t = 0 ! space/time variation of eddy coefficient: 853 892 ! ! =-20 (=-30) read in eddy_induced_velocity_2D.nc (..._3D.nc) file 854 ! ! = 0 constant 855 ! ! = 10 F(k) =ldf_c1d 856 ! ! = 20 F(i,j) =ldf_c2d 893 ! ! = 0 constant 894 ! ! = 10 F(k) =ldf_c1d 895 ! ! = 20 F(i,j) =ldf_c2d 857 896 ! ! = 21 F(i,j,t) =Treguier et al. JPO 1997 formulation 858 897 ! ! = 30 F(i,j,k) =ldf_c2d * ldf_c1d 859 ! ! time invariant coefficients: aei0 = 1/2 Ue*Le 898 ! ! time invariant coefficients: aei0 = 1/2 Ue*Le 860 899 rn_Ue = 0.02 ! lateral diffusive velocity [m/s] (nn_aht_ijk_t= 0, 10, 20, 30) 861 900 rn_Le = 200.e+3 ! lateral diffusive length [m] (nn_aht_ijk_t= 0, 10) … … 897 936 rn_lf_cutoff = 5.0 ! cutoff frequency for low-pass filter [days] 898 937 rn_zdef_max = 0.9 ! maximum fractional e3t deformation 899 ln_vvl_dbg = . true.! debug prints (T/F)938 ln_vvl_dbg = .false. ! debug prints (T/F) 900 939 / 901 940 !----------------------------------------------------------------------- … … 917 956 ln_dynvor_eeT = .false. ! energy conserving scheme (een using e3t) 918 957 ln_dynvor_een = .false. ! energy & enstrophy scheme 919 nn_een_e3f = 0 ! =0 e3f = mi(mj(e3t))/4 958 nn_een_e3f = 0 ! =0 e3f = mi(mj(e3t))/4 920 959 ! ! =1 e3f = mi(mj(e3t))/mi(mj( tmask)) 921 960 ln_dynvor_msk = .false. ! vorticity multiplied by fmask (=T) ==>>> PLEASE DO NOT ACTIVATE … … 962 1001 ! ! =-30 read in eddy_viscosity_3D.nc file 963 1002 ! ! =-20 read in eddy_viscosity_2D.nc file 964 ! ! = 0 constant 1003 ! ! = 0 constant 965 1004 ! ! = 10 F(k)=c1d 966 1005 ! ! = 20 F(i,j)=F(grid spacing)=c2d … … 968 1007 ! ! = 31 F(i,j,k)=F(grid spacing and local velocity) 969 1008 ! ! = 32 F(i,j,k)=F(local gridscale and deformation rate) 970 ! ! time invariant coefficients : ahm = 1/2 Uv*Lv (lap case) 1009 ! ! time invariant coefficients : ahm = 1/2 Uv*Lv (lap case) 971 1010 ! ! or = 1/12 Uv*Lv^3 (blp case) 972 1011 rn_Uv = 0.1 ! lateral viscous velocity [m/s] (nn_ahm_ijk_t= 0, 10, 20, 30) … … 1092 1131 ! = 0 constant 10 m length scale 1093 1132 ! = 1 0.5m at the equator to 30m poleward of 40 degrees 1094 rn_eice = 4 ! below sea ice: =0 ON ; =4 OFF when ice fraction > 1/4 1133 rn_eice = 4 ! below sea ice: =0 ON ; =4 OFF when ice fraction > 1/4 1095 1134 / 1096 1135 !----------------------------------------------------------------------- … … 1355 1394 ln_ctl = .FALSE. ! Toggle all report printing on/off (T/F); Ignored if sn_cfctl%l_config is T 1356 1395 sn_cfctl%l_config = .TRUE. ! IF .true. then control which reports are written with the following 1357 sn_cfctl%l_runstat = . FALSE.! switches and which areas produce reports with the proc integer settings.1396 sn_cfctl%l_runstat = .TRUE. ! switches and which areas produce reports with the proc integer settings. 1358 1397 sn_cfctl%l_trcstat = .FALSE. ! The default settings for the proc integers should ensure 1359 1398 sn_cfctl%l_oceout = .FALSE. ! that all areas report. -
NEMO/branches/2019/dev_r11943_MERGE_2019/cfgs/SPITZ12/EXPREF/namelist_cfg
r11536 r12182 107 107 sn_snow = 'MARv3.6-9km-Svalbard-2hourly_spitz' , 2. , 'snow' , .true. , .false. , 'yearly' , 'weights_bilin', '' , '' 108 108 sn_slp = 'MARv3.6-9km-Svalbard-2hourly_spitz' , 2. , 'slp' , .true. , .false. , 'yearly' , 'weights_bilin', '' , '' 109 sn_tdif = 'MARv3.6-9km-Svalbard-2hourly_spitz' , 2. , 'tdif' , .true. , .false. , 'yearly' , 'weights_bilin', '' , ''110 109 / 111 110 !----------------------------------------------------------------------- -
NEMO/branches/2019/dev_r11943_MERGE_2019/cfgs/ref_cfgs.txt
r12150 r12182 8 8 ORCA2_SAS_ICE OCE ICE NST SAS 9 9 ORCA2_ICE_PISCES OCE TOP ICE NST 10 ORCA2_ICE_ABL OCE ICE ABL 11 ORCA2_SAS_ICE_ABL OCE SAS ICE ABL 12 ORCA2_ICE OCE ICE 10 13 SPITZ12 OCE ICE 11 14 WED025 OCE ICE 15 eORCA025_ICE OCE ICE 16 eORCA025_ICE_ABL OCE ICE ABL 17 eORCA025_SAS_ICE_ABL OCE SAS ICE ABL -
NEMO/branches/2019/dev_r11943_MERGE_2019/doc/README.rst
r11761 r12182 1 **************************2 Building the documentation3 **************************4 1 5 .. todo::6 7 8 9 :file:`latex` : LaTeX sources and Latexmk configuration to build reference manuals with :file:`manual_build.sh`10 11 :file:`namelists`: Namelist blocks included in the documentation12 13 :file:`rst` : |RST man|_ sources and Sphinx configuration to build this guide hereby with :file:`guide_build.sh`14 15 .. |RST man| replace:: reStructuredText (rst)16 2 17 3 .. warning:: -
NEMO/branches/2019/dev_r11943_MERGE_2019/doc/latex/.svnignore
r11593 r12182 8 8 *.ilg 9 9 *.ind 10 *.lo* 10 *.lof 11 *.log 12 *.lot 11 13 *.maf 12 14 *.mtc* … … 14 16 *.pdf 15 17 *.toc 16 *.xdv17 18 _minted-* -
NEMO/branches/2019/dev_r11943_MERGE_2019/doc/latex/NEMO/build
- Property svn:ignore
-
old new 14 14 *.pdf 15 15 *.toc 16 *.xdv17 16 _minted-*
-
- Property svn:ignore
-
NEMO/branches/2019/dev_r11943_MERGE_2019/doc/latex/NEMO/main/appendices.tex
r11567 r12182 1 1 2 \subfile{../subfiles/a pdx_s_coord} %% A.Generalised vertical coordinate3 \subfile{../subfiles/a pdx_diff_opers} %% B. Diffusive operators4 \subfile{../subfiles/a pdx_invariants} %% C.Discrete invariants of the eqs.5 \subfile{../subfiles/a pdx_triads} %% D.Isoneutral diffusion using triads6 \subfile{../subfiles/a pdx_DOMAINcfg} %% E. Brief notes on DOMAINcfg2 \subfile{../subfiles/annex_A} %% Generalised vertical coordinate 3 \subfile{../subfiles/annex_B} %% Diffusive operator 4 \subfile{../subfiles/annex_C} %% Discrete invariants of the eqs. 5 \subfile{../subfiles/annex_iso} %% Isoneutral diffusion using triads 6 \subfile{../subfiles/annex_D} %% Coding rules 7 7 8 8 %% Not included … … 10 10 %\subfile{../subfiles/chap_DIU} 11 11 %\subfile{../subfiles/chap_conservation} 12 %\subfile{../subfiles/apdx_algos} %% Notes on some on going staff 12 %\subfile{../subfiles/annex_E} %% Notes on some on going staff 13 -
NEMO/branches/2019/dev_r11943_MERGE_2019/doc/latex/NEMO/main/bibliography.bib
r11674 r12182 400 400 } 401 401 402 @article{ brodeau.barnier.ea_JPO1 6,403 title = "Climatologically Significant Effects of Some Approximations in the Bulk Parameterizations of Turbulent Air –Sea Fluxes",402 @article{ brodeau.barnier.ea_JPO17, 403 title = "Climatologically Significant Effects of Some Approximations in the Bulk Parameterizations of Turbulent Air{\textendash}Sea Fluxes", 404 404 pages = "5--28", 405 405 journal = "Journal of Physical Oceanography", … … 407 407 number = "1", 408 408 author = "Brodeau, Laurent and Barnier, Bernard and Gulev, Sergey K. and Woods, Cian", 409 year = "201 6",409 year = "2017", 410 410 month = "jan", 411 411 publisher = "American Meteorological Society", … … 3134 3134 doi = "10.1029/92jc00911" 3135 3135 } 3136 3137 @article{large.yeager_CD09, 3138 author="Large, W. G. and Yeager, S. G.", 3139 title="The Global Climatology of an Interannually Varying Air-Sea Flux Data Set", 3140 pages = "341--364", 3141 journal="Climate Dynamics", 3142 volume = "33", 3143 number = "2-3", 3144 year="2009", 3145 month = "aug", 3146 publisher = "Springer Science and Business Media LLC", 3147 doi="10.1007/s00382-008-0441-3" 3148 } 3149 3150 @book{sverdrup.johnson.ea_1942, 3151 author = {H. U. Sverdrup and Martin W. Johnson and Richard H. Fleming}, 3152 title = {The Oceans, Their Physics, Chemistry, and General Biology}, 3153 publisher = {Prentice-Hall}, 3154 address = {New York}, 3155 year = {1942}, 3156 pages = {1087}, 3157 } 3158 3159 @article{kraus.businger_QJRMS96, 3160 author = "E. B. Kraus and J. A. Businger", 3161 title = "Atmosphere-ocean interaction.", 3162 journal="Quarterly Journal of the Royal Meteorological Society",, 3163 year = "1996", 3164 volume = "122", 3165 number = "529", 3166 pages = "324-325", 3167 publisher = "John Wiley & Sons, Ltd", 3168 issn = "1477-870X", 3169 doi = "10.1002/qj.49712252914" 3170 } 3171 3172 @article{josey.gulev.ea_2013, 3173 title = "Exchanges through the ocean surface", 3174 journal = "Ocean Circulation and Climate - A 21st Century Perspective, Int. Geophys. Ser.", 3175 year = "2013", 3176 author = "S. A. Josey and S. Gulev and L. Yu", 3177 pages = "115-140, edited by G. Siedler et al., Academic Press, Oxford", 3178 volume = "103", 3179 doi = "10.1016/B978-0-12-391851-2.00005-2" 3180 } 3181 3182 @article{fairall.bradley.ea_JGR96, 3183 year = "1996", 3184 journal = "Journal of Geophysical Research: Oceans", 3185 month = "jan", 3186 publisher = "American Geophysical Union", 3187 volume = "101", 3188 number = "C1", 3189 pages = "1295-1308", 3190 author = "C. W. Fairall and E. F. Bradley and J. S. Godfrey and G. A. Wick and J. B. Edson and G. S. Young", 3191 title = "Cool-skin and warm-layer effects on sea surface temperature", 3192 doi = "10.1029/95jc03190" 3193 } 3194 3195 @article{zeng.beljaars_GRL05, 3196 year = "2005", 3197 month = "jul", 3198 publisher = "American Geophysical Union", 3199 volume = "32", 3200 number = "14", 3201 author = "Xubin Zeng and Anton Beljaars", 3202 title = "A prognostic scheme of sea surface skin temperature for modeling and data assimilation", 3203 journal = "Geophysical Research Letters", 3204 doi = "10.1029/2005gl023030" 3205 } 3206 -
NEMO/branches/2019/dev_r11943_MERGE_2019/doc/latex/NEMO/main/chapters.tex
r11567 r12182 1 \subfile{../subfiles/chap_model_basics} %% 1. 2 \subfile{../subfiles/chap_time_domain} %% 2. Time discretisation (time stepping strategy) 3 \subfile{../subfiles/chap_DOM} %% 3. Space discretisation 4 \subfile{../subfiles/chap_TRA} %% 4. Tracer advection/diffusion equation 5 \subfile{../subfiles/chap_DYN} %% 5. Dynamics : momentum equation 6 \subfile{../subfiles/chap_SBC} %% 6. Surface Boundary Conditions 7 \subfile{../subfiles/chap_LBC} %% 7. Lateral Boundary Conditions 8 \subfile{../subfiles/chap_LDF} %% 8. Lateral diffusion 9 \subfile{../subfiles/chap_ZDF} %% 9. Vertical diffusion 10 \subfile{../subfiles/chap_DIA} %% 10. Outputs and Diagnostics 11 \subfile{../subfiles/chap_OBS} %% 11. Observation operator 12 \subfile{../subfiles/chap_ASM} %% 12. Assimilation increments 13 \subfile{../subfiles/chap_STO} %% 13. Stochastic param. 14 \subfile{../subfiles/chap_misc} %% 14. Miscellaneous topics 15 \subfile{../subfiles/chap_cfgs} %% 15. Predefined configurations 16 17 %% Not included 18 %\subfile{../subfiles/chap_model_basics_zstar} 19 %\subfile{../subfiles/chap_DIU} 20 %\subfile{../subfiles/chap_conservation} 1 \subfile{../subfiles/introduction} %% Introduction 2 \subfile{../subfiles/chap_model_basics} 3 \subfile{../subfiles/chap_time_domain} %% Time discretisation (time stepping strategy) 4 \subfile{../subfiles/chap_DOM} %% Space discretisation 5 \subfile{../subfiles/chap_TRA} %% Tracer advection/diffusion equation 6 \subfile{../subfiles/chap_DYN} %% Dynamics : momentum equation 7 \subfile{../subfiles/chap_SBC} %% Surface Boundary Conditions 8 \subfile{../subfiles/chap_LBC} %% Lateral Boundary Conditions 9 \subfile{../subfiles/chap_LDF} %% Lateral diffusion 10 \subfile{../subfiles/chap_ZDF} %% Vertical diffusion 11 \subfile{../subfiles/chap_DIA} %% Outputs and Diagnostics 12 \subfile{../subfiles/chap_OBS} %% Observation operator 13 \subfile{../subfiles/chap_ASM} %% Assimilation increments 14 \subfile{../subfiles/chap_STO} %% Stochastic param. 15 \subfile{../subfiles/chap_misc} %% Miscellaneous topics 16 \subfile{../subfiles/chap_CONFIG} %% Predefined configurations -
NEMO/branches/2019/dev_r11943_MERGE_2019/doc/latex/NEMO/subfiles/chap_SBC.tex
r11693 r12182 1 1 \documentclass[../main/NEMO_manual]{subfiles} 2 \usepackage{fontspec} 3 \usepackage{fontawesome} 2 4 3 5 \begin{document} … … 45 47 46 48 \begin{itemize} 47 \item a bulk formulation (\np[=.true.]{ln_blk}{ln\_blk} with four possible bulk algorithms),49 \item a bulk formulation (\np[=.true.]{ln_blk}{ln\_blk}), featuring a selection of four bulk parameterization algorithms, 48 50 \item a flux formulation (\np[=.true.]{ln_flx}{ln\_flx}), 49 51 \item a coupled or mixed forced/coupled formulation (exchanges with a atmospheric model via the OASIS coupler), … … 504 506 \label{sec:SBC_flx} 505 507 508 % Laurent: DO NOT mix up ``bulk formulae'' (the classic equation) and the ``bulk 509 % parameterization'' (i.e NCAR, COARE, ECMWF...) 510 506 511 \begin{listing} 507 512 \nlst{namsbc_flx} … … 520 525 See \autoref{subsec:SBC_ssr} for its specification. 521 526 522 %% ================================================================================================= 527 528 529 530 531 532 533 %% ================================================================================================= 534 \pagebreak 535 \newpage 523 536 \section[Bulk formulation (\textit{sbcblk.F90})]{Bulk formulation (\protect\mdl{sbcblk})} 524 537 \label{sec:SBC_blk} 538 539 % L. Brodeau, December 2019... % 525 540 526 541 \begin{listing} … … 530 545 \end{listing} 531 546 532 In the bulk formulation, the surface boundary condition fields are computed with bulk formulae using atmospheric fields 533 and ocean (and sea-ice) variables averaged over \np{nn_fsbc}{nn\_fsbc} time-step. 534 535 The atmospheric fields used depend on the bulk formulae used. 536 In forced mode, when a sea-ice model is used, a specific bulk formulation is used. 537 Therefore, different bulk formulae are used for the turbulent fluxes computation 538 over the ocean and over sea-ice surface. 539 For the ocean, four bulk formulations are available thanks to the \href{https://brodeau.github.io/aerobulk/}{Aerobulk} package (\citet{brodeau.barnier.ea_JPO16}): 540 the NCAR (formerly named CORE), COARE 3.0, COARE 3.5 and ECMWF bulk formulae. 541 The choice is made by setting to true one of the following namelist variable: 542 \np{ln_NCAR}{ln\_NCAR}, \np{ln_COARE_3p0}{ln\_COARE\_3p0}, \np{ln_COARE_3p5}{ln\_COARE\_3p5} and \np{ln_ECMWF}{ln\_ECMWF}. 543 For sea-ice, three possibilities can be selected: 544 a constant transfer coefficient (1.4e-3; default value), \citet{lupkes.gryanik.ea_JGR12} (\np{ln_Cd_L12}{ln\_Cd\_L12}), and \citet{lupkes.gryanik_JGR15} (\np{ln_Cd_L15}{ln\_Cd\_L15}) parameterizations 547 If the bulk formulation is selected (\np[=.true.]{ln_blk}{ln\_blk}), the air-sea 548 fluxes associated with surface boundary conditions are estimated by means of the 549 traditional \emph{bulk formulae}. As input, bulk formulae rely on a prescribed 550 near-surface atmosphere state (typically extracted from a weather reanalysis) 551 and the prognostic sea (-ice) surface state averaged over \np{nn_fsbc}{nn\_fsbc} 552 time-step(s). 553 554 % Turbulent air-sea fluxes are computed using the sea surface properties and 555 % atmospheric SSVs at height $z$ above the sea surface, with the traditional 556 % aerodynamic bulk formulae: 557 558 Note: all the NEMO Fortran routines involved in the present section have been 559 initially developed (and are still developed in parallel) in 560 the \href{https://brodeau.github.io/aerobulk/}{\texttt{AeroBulk}} open-source project 561 \citep{brodeau.barnier.ea_JPO17}. 562 563 %%% Bulk formulae are this: 564 \subsection{Bulk formulae}\label{subsec:SBC_blkform} 565 % 566 In NEMO, the set of equations that relate each component of the surface fluxes 567 to the near-surface atmosphere and sea surface states writes 568 % 569 \begin{subequations}\label{eq_bulk} 570 \label{eq:SBC_bulk_form} 571 \begin{eqnarray} 572 \mathbf{\tau} &=& \rho~ C_D ~ \mathbf{U}_z ~ U_B \\ 573 Q_H &=& \rho~C_H~C_P~\big[ \theta_z - T_s \big] ~ U_B \\ 574 E &=& \rho~C_E ~\big[ q_s - q_z \big] ~ U_B \\ 575 Q_L &=& -L_v \, E \\ 576 % 577 Q_{sr} &=& (1 - a) Q_{sw\downarrow} \\ 578 Q_{ir} &=& \delta (Q_{lw\downarrow} -\sigma T_s^4) 579 \end{eqnarray} 580 \end{subequations} 581 % 582 with 583 \[ \theta_z \simeq T_z+\gamma z \] 584 \[ q_s \simeq 0.98\,q_{sat}(T_s,p_a ) \] 585 % 586 from which, the the non-solar heat flux is \[ Q_{ns} = Q_L + Q_H + Q_{ir} \] 587 % 588 where $\mathbf{\tau}$ is the wind stress vector, $Q_H$ the sensible heat flux, 589 $E$ the evaporation, $Q_L$ the latent heat flux, and $Q_{ir}$ the net longwave 590 flux. 591 % 592 $Q_{sw\downarrow}$ and $Q_{lw\downarrow}$ are the surface downwelling shortwave 593 and longwave radiative fluxes, respectively. 594 % 595 Note: a positive sign for $\mathbf{\tau}$, $Q_H$, $Q_L$, $Q_{sr}$ or $Q_{ir}$ 596 implies a gain of the relevant quantity for the ocean, while a positive $E$ 597 implies a freshwater loss for the ocean. 598 % 599 $\rho$ is the density of air. $C_D$, $C_H$ and $C_E$ are the bulk transfer 600 coefficients for momentum, sensible heat, and moisture, respectively. 601 % 602 $C_P$ is the heat capacity of moist air, and $L_v$ is the latent heat of 603 vaporization of water. 604 % 605 $\theta_z$, $T_z$ and $q_z$ are the potential temperature, absolute temperature, 606 and specific humidity of air at height $z$ above the sea surface, 607 respectively. $\gamma z$ is a temperature correction term which accounts for the 608 adiabatic lapse rate and approximates the potential temperature at height 609 $z$ \citep{josey.gulev.ea_2013}. 610 % 611 $\mathbf{U}_z$ is the wind speed vector at height $z$ above the sea surface 612 (possibly referenced to the surface current $\mathbf{u_0}$, 613 section \ref{s_res1}.\ref{ss_current}). 614 % 615 The bulk scalar wind speed, namely $U_B$, is the scalar wind speed, 616 $|\mathbf{U}_z|$, with the potential inclusion of a gustiness contribution. 617 % 618 $a$ and $\delta$ are the albedo and emissivity of the sea surface, respectively.\\ 619 % 620 %$p_a$ is the mean sea-level pressure (SLP). 621 % 622 $T_s$ is the sea surface temperature. $q_s$ is the saturation specific humidity 623 of air at temperature $T_s$; it includes a 2\% reduction to account for the 624 presence of salt in seawater \citep{sverdrup.johnson.ea_1942,kraus.businger_QJRMS96}. 625 Depending on the bulk parametrization used, $T_s$ can either be the temperature 626 at the air-sea interface (skin temperature, hereafter SSST) or at typically a 627 few tens of centimeters below the surface (bulk sea surface temperature, 628 hereafter SST). 629 % 630 The SSST differs from the SST due to the contributions of two effects of 631 opposite sign, the \emph{cool skin} and \emph{warm layer} (hereafter CS and WL, 632 respectively, see section\,\ref{subsec:SBC_skin}). 633 % 634 Technically, when the ECMWF or COARE* bulk parametrizations are selected 635 (\np[=.true.]{ln_ECMWF}{ln\_ECMWF} or \np[=.true.]{ln_COARE*}{ln\_COARE\*}), 636 $T_s$ is the SSST, as opposed to the NCAR bulk parametrization 637 (\np[=.true.]{ln_NCAR}{ln\_NCAR}) for which $T_s$ is the bulk SST (\ie~temperature 638 at first T-point level). 639 640 For more details on all these aspects the reader is invited to refer 641 to \citet{brodeau.barnier.ea_JPO17}. 642 643 644 645 \subsection{Bulk parametrizations}\label{subsec:SBC_blk_ocean} 646 %%%\label{subsec:SBC_param} 647 648 Accuracy of the estimate of surface turbulent fluxes by means of bulk formulae 649 strongly relies on that of the bulk transfer coefficients: $C_D$, $C_H$ and 650 $C_E$. They are estimated with what we refer to as a \emph{bulk 651 parametrization} algorithm. When relevant, these algorithms also perform the 652 height adjustment of humidity and temperature to the wind reference measurement 653 height (from \np{rn_zqt}{rn\_zqt} to \np{rn_zu}{rn\_zu}). 654 655 656 657 For the open ocean, four bulk parametrization algorithms are available in NEMO: 658 \begin{itemize} 659 \item NCAR, formerly known as CORE, \citep{large.yeager_rpt04,large.yeager_CD09} 660 \item COARE 3.0 \citep{fairall.bradley.ea_JC03} 661 \item COARE 3.6 \citep{edson.jampana.ea_JPO13} 662 \item ECMWF (IFS documentation, cy45) 663 \end{itemize} 664 665 666 With respect to version 3, the principal advances in version 3.6 of the COARE 667 bulk parametrization are built around improvements in the representation of the 668 effects of waves on 669 fluxes \citep{edson.jampana.ea_JPO13,brodeau.barnier.ea_JPO17}. This includes 670 improved relationships of surface roughness, and whitecap fraction on wave 671 parameters. It is therefore recommended to chose version 3.6 over 3. 672 673 674 675 676 \subsection{Cool-skin and warm-layer parametrizations}\label{subsec:SBC_skin} 677 %\subsection[Cool-skin and warm-layer parameterizations 678 %(\forcode{ln_skin_cs} \& \forcode{ln_skin_wl})]{Cool-skin and warm-layer parameterizations (\protect\np{ln_skin_cs}{ln\_skin\_cs} \& \np{ln_skin_wl}{ln\_skin\_wl})} 679 %\label{subsec:SBC_skin} 680 % 681 As opposed to the NCAR bulk parametrization, more advanced bulk 682 parametrizations such as COARE3.x and ECMWF are meant to be used with the skin 683 temperature $T_s$ rather than the bulk SST (which, in NEMO is the temperature at 684 the first T-point level, see section\,\ref{subsec:SBC_blkform}). 685 % 686 As such, the relevant cool-skin and warm-layer parametrization must be 687 activated through \np[=T]{ln_skin_cs}{ln\_skin\_cs} 688 and \np[=T]{ln_skin_wl}{ln\_skin\_wl} to use COARE3.x or ECMWF in a consistent 689 way. 690 691 \texttt{\#LB: ADD BLBLA ABOUT THE TWO CS/WL PARAMETRIZATIONS (ECMWF and COARE) !!!} 692 693 For the cool-skin scheme parametrization COARE and ECMWF algorithms share the same 694 basis: \citet{fairall.bradley.ea_JGR96}. With some minor updates based 695 on \citet{zeng.beljaars_GRL05} for ECMWF, and \citet{fairall.ea_19} for COARE 696 3.6. 697 698 For the warm-layer scheme, ECMWF is based on \citet{zeng.beljaars_GRL05} with a 699 recent update from \citet{takaya.bidlot.ea_JGR10} (consideration of the 700 turbulence input from Langmuir circulation). 701 702 Importantly, COARE warm-layer scheme \citep{fairall.ea_19} includes a prognostic 703 equation for the thickness of the warm-layer, while it is considered as constant 704 in the ECWMF algorithm. 705 706 707 \subsection{Appropriate use of each bulk parametrization} 708 709 \subsubsection{NCAR} 710 711 NCAR bulk parametrizations (formerly known as CORE) is meant to be used with the 712 CORE II atmospheric forcing \citep{large.yeager_CD09}. The expected sea surface 713 temperature is the bulk SST. Hence the following namelist parameters must be 714 set: 715 % 716 \begin{verbatim} 717 ... 718 ln_NCAR = .true. 719 ... 720 rn_zqt = 10. ! Air temperature & humidity reference height (m) 721 rn_zu = 10. ! Wind vector reference height (m) 722 ... 723 ln_skin_cs = .false. ! use the cool-skin parameterization 724 ln_skin_wl = .false. ! use the warm-layer parameterization 725 ... 726 ln_humi_sph = .true. ! humidity "sn_humi" is specific humidity [kg/kg] 727 \end{verbatim} 728 729 730 \subsubsection{ECMWF} 731 % 732 With an atmospheric forcing based on a reanalysis of the ECMWF, such as the 733 Drakkar Forcing Set \citep{brodeau.barnier.ea_OM10}, we strongly recommend to 734 use the ECMWF bulk parametrizations with the cool-skin and warm-layer 735 parametrizations activated. In ECMWF reanalyzes, since air temperature and 736 humidity are provided at the 2\,m height, and given that the humidity is 737 distributed as the dew-point temperature, the namelist must be tuned as follows: 738 % 739 \begin{verbatim} 740 ... 741 ln_ECMWF = .true. 742 ... 743 rn_zqt = 2. ! Air temperature & humidity reference height (m) 744 rn_zu = 10. ! Wind vector reference height (m) 745 ... 746 ln_skin_cs = .true. ! use the cool-skin parameterization 747 ln_skin_wl = .true. ! use the warm-layer parameterization 748 ... 749 ln_humi_dpt = .true. ! humidity "sn_humi" is dew-point temperature [K] 750 ... 751 \end{verbatim} 752 % 753 Note: when \np{ln_ECMWF}{ln\_ECMWF} is selected, the selection 754 of \np{ln_skin_cs}{ln\_skin\_cs} and \np{ln_skin_wl}{ln\_skin\_wl} implicitly 755 triggers the use of the ECMWF cool-skin and warm-layer parametrizations, 756 respectively (found in \textit{sbcblk\_skin\_ecmwf.F90}). 757 758 759 \subsubsection{COARE 3.x} 760 % 761 Since the ECMWF parametrization is largely based on the COARE* parametrization, 762 the two algorithms are very similar in terms of structure and closure 763 approach. As such, the namelist tuning for COARE 3.x is identical to that of 764 ECMWF: 765 % 766 \begin{verbatim} 767 ... 768 ln_COARE3p6 = .true. 769 ... 770 ln_skin_cs = .true. ! use the cool-skin parameterization 771 ln_skin_wl = .true. ! use the warm-layer parameterization 772 ... 773 \end{verbatim} 774 775 Note: when \np[=T]{ln_COARE3p0}{ln\_COARE3p0} is selected, the selection 776 of \np{ln_skin_cs}{ln\_skin\_cs} and \np{ln_skin_wl}{ln\_skin\_wl} implicitly 777 triggers the use of the COARE cool-skin and warm-layer parametrizations, 778 respectively (found in \textit{sbcblk\_skin\_coare.F90}). 779 780 781 %lulu 782 783 784 785 % In a typical bulk algorithm, the BTCs under neutral stability conditions are 786 % defined using \emph{in-situ} flux measurements while their dependence on the 787 % stability is accounted through the \emph{Monin-Obukhov Similarity Theory} and 788 % the \emph{flux-profile} relationships \citep[\eg{}][]{Paulson_1970}. BTCs are 789 % functions of the wind speed and the near-surface stability of the atmospheric 790 % surface layer (hereafter ASL), and hence, depend on $U_B$, $T_s$, $T_z$, $q_s$ 791 % and $q_z$. 792 793 794 795 \subsection{Prescribed near-surface atmospheric state} 796 797 The atmospheric fields used depend on the bulk formulae used. In forced mode, 798 when a sea-ice model is used, a specific bulk formulation is used. Therefore, 799 different bulk formulae are used for the turbulent fluxes computation over the 800 ocean and over sea-ice surface. 801 % 802 803 %The choice is made by setting to true one of the following namelist 804 %variable: \np{ln_NCAR}{ln\_NCAR}, \np{ln_COARE_3p0}{ln\_COARE\_3p0}, \np{ln_COARE_3p6}{ln\_COARE\_3p6} 805 %and \np{ln_ECMWF}{ln\_ECMWF}. 545 806 546 807 Common options are defined through the \nam{sbc_blk}{sbc\_blk} namelist variables. … … 553 814 Variable description & Model variable & Units & point \\ 554 815 \hline 555 i-component of the 10m air velocity & utau& $m.s^{-1}$ & T \\816 i-component of the 10m air velocity & wndi & $m.s^{-1}$ & T \\ 556 817 \hline 557 j-component of the 10m air velocity & vtau& $m.s^{-1}$ & T \\818 j-component of the 10m air velocity & wndj & $m.s^{-1}$ & T \\ 558 819 \hline 559 10m air temperature & tair & \r{}$K$& T \\820 10m air temperature & tair & $K$ & T \\ 560 821 \hline 561 Specific humidity & humi & \% & T \\ 822 Specific humidity & humi & $-$ & T \\ 823 Relative humidity & ~ & $\%$ & T \\ 824 Dew-point temperature & ~ & $K$ & T \\ 562 825 \hline 563 Incoming long wave radiation& qlw & $W.m^{-2}$ & T \\826 Downwelling longwave radiation & qlw & $W.m^{-2}$ & T \\ 564 827 \hline 565 Incoming short wave radiation& qsr & $W.m^{-2}$ & T \\828 Downwelling shortwave radiation & qsr & $W.m^{-2}$ & T \\ 566 829 \hline 567 830 Total precipitation (liquid + solid) & precip & $Kg.m^{-2}.s^{-1}$ & T \\ … … 584 847 585 848 \np{cn_dir}{cn\_dir} is the directory of location of bulk files 586 \np{ln_taudif}{ln\_taudif} is the flag to specify if we use HightFrequency (HF) tau information (.true.) or not (.false.)849 %\np{ln_taudif}{ln\_taudif} is the flag to specify if we use High Frequency (HF) tau information (.true.) or not (.false.) 587 850 \np{rn_zqt}{rn\_zqt}: is the height of humidity and temperature measurements (m) 588 851 \np{rn_zu}{rn\_zu}: is the height of wind measurements (m) … … 595 858 Its range must be between zero and one, and it is recommended to set it to 0 at low-resolution (ORCA2 configuration). 596 859 597 As for the flux formulation, information about the input data required by the model is provided in860 As for the flux parametrization, information about the input data required by the model is provided in 598 861 the namsbc\_blk namelist (see \autoref{subsec:SBC_fldread}). 599 862 600 %% ================================================================================================= 601 \subsection[Ocean-Atmosphere Bulk formulae (\textit{sbcblk\_algo\_coare.F90, sbcblk\_algo\_coare3p5.F90, sbcblk\_algo\_ecmwf.F90, sbcblk\_algo\_ncar.F90})]{Ocean-Atmosphere Bulk formulae (\mdl{sbcblk\_algo\_coare}, \mdl{sbcblk\_algo\_coare3p5}, \mdl{sbcblk\_algo\_ecmwf}, \mdl{sbcblk\_algo\_ncar})} 602 \label{subsec:SBC_blk_ocean} 603 604 Four different bulk algorithms are available to compute surface turbulent momentum and heat fluxes over the ocean. 605 COARE 3.0, COARE 3.5 and ECMWF schemes mainly differ by their roughness lenghts computation and consequently 606 their neutral transfer coefficients relationships with neutral wind. 607 \begin{itemize} 608 \item NCAR (\np[=.true.]{ln_NCAR}{ln\_NCAR}): The NCAR bulk formulae have been developed by \citet{large.yeager_rpt04}. 609 They have been designed to handle the NCAR forcing, a mixture of NCEP reanalysis and satellite data. 610 They use an inertial dissipative method to compute the turbulent transfer coefficients 611 (momentum, sensible heat and evaporation) from the 10m wind speed, air temperature and specific humidity. 612 This \citet{large.yeager_rpt04} dataset is available through 613 the \href{http://nomads.gfdl.noaa.gov/nomads/forms/mom4/NCAR.html}{GFDL web site}. 614 Note that substituting ERA40 to NCEP reanalysis fields does not require changes in the bulk formulea themself. 615 This is the so-called DRAKKAR Forcing Set (DFS) \citep{brodeau.barnier.ea_OM10}. 616 \item COARE 3.0 (\np[=.true.]{ln_COARE_3p0}{ln\_COARE\_3p0}): See \citet{fairall.bradley.ea_JC03} for more details 617 \item COARE 3.5 (\np[=.true.]{ln_COARE_3p5}{ln\_COARE\_3p5}): See \citet{edson.jampana.ea_JPO13} for more details 618 \item ECMWF (\np[=.true.]{ln_ECMWF}{ln\_ECMWF}): Based on \href{https://www.ecmwf.int/node/9221}{IFS (Cy31)} implementation and documentation. 619 Surface roughness lengths needed for the Obukhov length are computed following \citet{beljaars_QJRMS95}. 620 \end{itemize} 863 864 \subsubsection{Air humidity} 865 866 Air humidity can be provided as three different parameters: specific humidity 867 [kg/kg], relative humidity [\%], or dew-point temperature [K] (LINK to namelist 868 parameters)... 869 870 871 ~\\ 872 873 874 875 876 877 878 879 880 881 882 %% ================================================================================================= 883 %\subsection[Ocean-Atmosphere Bulk formulae (\textit{sbcblk\_algo\_coare3p0.F90, sbcblk\_algo\_coare3p6.F90, %sbcblk\_algo\_ecmwf.F90, sbcblk\_algo\_ncar.F90})]{Ocean-Atmosphere Bulk formulae (\mdl{sbcblk\_algo\_coare3p0}, %\mdl{sbcblk\_algo\_coare3p6}, \mdl{sbcblk\_algo\_ecmwf}, \mdl{sbcblk\_algo\_ncar})} 884 %\label{subsec:SBC_blk_ocean} 885 886 %Four different bulk algorithms are available to compute surface turbulent momentum and heat fluxes over the ocean. 887 %COARE 3.0, COARE 3.6 and ECMWF schemes mainly differ by their roughness lenghts computation and consequently 888 %their neutral transfer coefficients relationships with neutral wind. 889 %\begin{itemize} 890 %\item NCAR (\np[=.true.]{ln_NCAR}{ln\_NCAR}): The NCAR bulk formulae have been developed by \citet{large.yeager_rpt04}. 891 % They have been designed to handle the NCAR forcing, a mixture of NCEP reanalysis and satellite data. 892 % They use an inertial dissipative method to compute the turbulent transfer coefficients 893 % (momentum, sensible heat and evaporation) from the 10m wind speed, air temperature and specific humidity. 894 % This \citet{large.yeager_rpt04} dataset is available through 895 % the \href{http://nomads.gfdl.noaa.gov/nomads/forms/mom4/NCAR.html}{GFDL web site}. 896 % Note that substituting ERA40 to NCEP reanalysis fields does not require changes in the bulk formulea themself. 897 % This is the so-called DRAKKAR Forcing Set (DFS) \citep{brodeau.barnier.ea_OM10}. 898 %\item COARE 3.0 (\np[=.true.]{ln_COARE_3p0}{ln\_COARE\_3p0}): See \citet{fairall.bradley.ea_JC03} for more details 899 %\item COARE 3.6 (\np[=.true.]{ln_COARE_3p6}{ln\_COARE\_3p6}): See \citet{edson.jampana.ea_JPO13} for more details 900 %\item ECMWF (\np[=.true.]{ln_ECMWF}{ln\_ECMWF}): Based on \href{https://www.ecmwf.int/node/9204}{IFS (Cy40r1)} %implementation and documentation. 901 % Surface roughness lengths needed for the Obukhov length are computed 902 % following \citet{beljaars_QJRMS95}. 903 %\end{itemize} 621 904 622 905 %% ================================================================================================= 623 906 \subsection{Ice-Atmosphere Bulk formulae} 624 907 \label{subsec:SBC_blk_ice} 908 909 910 \texttt{\#out\_of\_place:} 911 For sea-ice, three possibilities can be selected: 912 a constant transfer coefficient (1.4e-3; default 913 value), \citet{lupkes.gryanik.ea_JGR12} (\np{ln_Cd_L12}{ln\_Cd\_L12}), 914 and \citet{lupkes.gryanik_JGR15} (\np{ln_Cd_L15}{ln\_Cd\_L15}) parameterizations 915 \texttt{\#out\_of\_place.} 916 917 918 625 919 626 920 Surface turbulent fluxes between sea-ice and the atmosphere can be computed in three different ways: -
NEMO/branches/2019/dev_r11943_MERGE_2019/doc/latex/SI3/build
- Property svn:ignore
-
old new 14 14 *.pdf 15 15 *.toc 16 *.xdv17 16 _minted-*
-
- Property svn:ignore
-
NEMO/branches/2019/dev_r11943_MERGE_2019/doc/latex/SI3/main/chapters.tex
r11537 r12182 1 1 \subfile{../subfiles/todolist} 2 3 \subfile{../subfiles/introduction} % Introduction 2 4 3 5 \subfile{../subfiles/chap_model_basics} -
NEMO/branches/2019/dev_r11943_MERGE_2019/doc/latex/TOP/build
- Property svn:ignore
-
old new 14 14 *.pdf 15 15 *.toc 16 *.xdv17 16 _minted-*
-
- Property svn:ignore
-
NEMO/branches/2019/dev_r11943_MERGE_2019/doc/latex/TOP/main/chapters.tex
r11591 r12182 1 \subfile{../subfiles/introduction} 1 2 \subfile{../subfiles/model_description} 2 3 \subfile{../subfiles/model_setup} -
NEMO/branches/2019/dev_r11943_MERGE_2019/doc/latex/global
-
Property
svn:ignore
set to
*.aux
-
Property
svn:ignore
set to
-
NEMO/branches/2019/dev_r11943_MERGE_2019/doc/latex/global/document.tex
r11693 r12182 1 1 2 %% ============================================================================== ===================3 %% Template structure for reference manual s4 %% ============================================================================== ===================2 %% ============================================================================== 3 %% Template structure for reference manual 4 %% ============================================================================== 5 5 6 6 %% NEMO release version 7 \def \version{ trunk}7 \def \version{4.0rc~} 8 8 9 9 %% Preamble 10 %% ============================================================================== ===================10 %% ============================================================================== 11 11 12 12 %% Document layout 13 \documentclass[ fontsize = 10pt, twoside, abstract]{scrreprt}13 \documentclass[draft]{scrreprt} 14 14 15 %% Load manual configuration 16 \input{../../global/prologue} 15 %% Load the configuration of the manual 16 \input{../main/definitions} 17 18 %% Load global *.tex files 19 \input{../../global/preamble} 20 21 \dominitoc 22 23 %% Launch the creation of the indexes 24 \input{../../global/indexes} 25 17 26 18 27 %% End of common preamble between main and sub-files 19 28 %% Override custom cmds for full manual compilation 20 \newcommand{\ subinc}[1]{#1}21 \newcommand{\ subexc}[1]{}29 \newcommand{\onlyinsubfile}[1]{#1} 30 \newcommand{\notinsubfile}[1]{} 22 31 23 32 \begin{document} 24 33 25 \renewcommand{\subinc}[1]{} 26 \renewcommand{\subexc}[1]{#1} 34 \renewcommand{\onlyinsubfile}[1]{} 35 \renewcommand{\notinsubfile}[1]{#1} 36 37 \renewcommand{\biblio}{} 38 \renewcommand{\pindex}{} 27 39 28 40 29 41 %% Frontmatter 30 %% ============================================================================== ===================42 %% ============================================================================== 31 43 32 \pagenumbering{gobble} %% Disable page numbering temporarily44 \pagenumbering{gobble} 33 45 34 46 %% Title page 35 47 \input{../../global/frontpage} 36 48 37 %% Footer for introductory parts (no header by cleaning default) 38 \ ofoot[]{\engine\ Reference Manual} \ifoot[]{\pagemark}49 \maketitle 50 \emptythanks 39 51 40 52 %% Information page (2nd page) 41 53 \input{../../global/info_page} 42 54 43 \listoffigures 44 \listoflistings 45 \listoftables 46 47 \clearpage 48 55 %% Foreword 56 %\frontmatter %% Chapter numbering off and Roman numerals for page numbers 49 57 \pagenumbering{roman} 50 \ofoot[]{\engine\ Reference Manual} \ifoot[]{\pagemark} 51 52 \input{introduction} 58 \input{foreword} 53 59 54 60 %% Table of Contents 55 61 \tableofcontents 62 \listoffigures 63 \listoftables 64 \listoflistings 56 65 57 66 \clearpage 67 %\end{document} 58 68 59 69 60 70 %% Mainmatter 61 %% ============================================================================== ===================71 %% ============================================================================== 62 72 63 % % Headings for document body73 %\mainmatter %% Chapter numbering on, page numbering is reset with Arabic numerals 64 74 \pagenumbering{arabic} 65 \lohead{Chap.\ \thechapter\ \leftmark} \rehead{Sect.\ \thesection\ \rightmark}66 \ifoot[]{Page\ \pagemark\ of \pageref*{LastPage}}67 75 68 76 \include{chapters} … … 70 78 71 79 %% Appendix 72 %% ============================================================================== ===================80 %% ============================================================================== 73 81 74 \appendix %% Chapter numbering with letters by now 75 \lohead{Apdx\ \thechapter\ \leftmark} 82 %% Chapter numbering is reset with letters now 83 \appendix 84 76 85 \include{appendices} 77 78 %% Append coding rules for every manual79 \input{../../global/coding_rules}80 86 81 87 82 88 %% Backmatter 83 %% ============================================================================== ===================89 %% ============================================================================== 84 90 85 %% Bibliography and indexes 86 \input{../../global/epilogue} 91 %\backmatter %% Chapter numbering off 92 93 %% Bibliography 94 \phantomsection 95 \addcontentsline{toc}{chapter}{Bibliography} 96 \bibliography{../main/bibliography} 97 98 %% Index 99 \clearpage 100 \phantomsection 101 \addcontentsline{toc}{chapter}{Indexes} 102 \printindex[keys] 103 \printindex[modules] 104 \printindex[blocks] 105 \printindex[parameters] 106 \printindex[subroutines] 87 107 88 108 \end{document} 109 -
NEMO/branches/2019/dev_r11943_MERGE_2019/doc/latex/global/frontpage.tex
r11688 r12182 1 1 2 \ begin{titlepage}3 % \newgeometry{hmargin = 1.5cm, vmargin = 3cm}4 \setlength{\parindent}{0pt}2 \title{\heading} 3 \author{\firstauthor \and \secondauthor\thanks{\protect\input{thanks}}} 4 \date{\today} 5 5 6 \pretitle{ 6 7 \begin{center} 7 \begin{minipage}{0.3\textwidth} 8 \includegraphics[height=1.5cm]{logos/NEMO_grey} 9 \end{minipage}\begin{minipage}{0.6\textwidth} 10 \begin{center} 11 \Large\slshape 12 \textbf{N}ucleus for \textbf{E}uropean \textbf{M}odelling of the \textbf{O}cean \\ 13 \medskip 14 \hyperref[resources]{\textcolor{black}{ 15 \faWordpress \hspace{0.75cm} \faCodeFork \hspace{0.75cm} 16 \faGithub \hspace{0.75cm} \faCloudDownload \hspace{0.75cm} \faEnvelope 17 } 18 } 19 \end{center} 20 \end{minipage} 8 \begin{figure}[H] 9 \begin{minipage}[c]{0.35\textwidth} 10 \href{http://www.nemo-ocean.eu}{\includegraphics[width=0.7\textwidth]{logos/NEMO_grey}} 11 \end{minipage} 12 \hfill 13 \begin{minipage}[c]{0.65\textwidth} 14 \centering 15 \large{\em{{N}ucleus for {E}uropean {M}odelling of the {O}cean}} 16 \end{minipage} 17 \end{figure} 18 \vfill 19 \Huge 20 } 21 \posttitle{\par\end{center}\vskip 0.5em} 22 \preauthor{\begin{center}\Large\lineskip0.5em\begin{tabular}[t]{c}} 23 \postauthor{\end{tabular}\par\end{center}} 24 \predate{ 25 \vfill 26 \begin{center} 27 \large Version \version --- 28 } 29 \postdate{ 30 \par~\\ 31 \href{http://doi.org/10.5281/zenodo.\zid}{\includegraphics{{badges/zenodo.\zid}.pdf}} 21 32 \end{center} 33 \vfill 34 \begin{center} 35 \href{http://www.cmcc.it}{ \includegraphics[height=0.055\textheight]{logos/CMCC}} 36 \hspace{0.5em} 37 \href{http://www.cnrs.fr}{ \includegraphics[height=0.055\textheight]{logos/CNRS}} 38 \hspace{0.9em} 39 \href{http://www.mercator-ocean.fr}{\includegraphics[height=0.055\textheight]{logos/MOI} } 40 \hspace{0.45em} 41 \href{http://www.metoffice.gov.uk}{ \includegraphics[height=0.055\textheight]{logos/UKMO}} 42 \hspace{0.5em} 43 \href{http://nerc.ukri.org}{ \includegraphics[height=0.055\textheight]{logos/NERC}} \\ 44 \large{{\em{C}ommunity \hspace{1.5em} {O}cean \hspace{1.5em} {M}odel}} 45 \end{center} 46 } 22 47 23 \spacetop 24 \textcolor{white}{\fontsize{0.8cm}{0.8cm}\selectfont\textbf{\heading}} 25 \ifdef{\subheading}{ 26 \medskip 27 \par 28 \textcolor{white}{\Huge \subheading} 29 }{} 30 \spacedown 48 \thanksmarkseries{fnsymbol} 31 49 32 \begin{center}33 \LARGE Version \version\ -\ \today \\34 \medskip35 \href{http://doi.org/10.5281/zenodo.\zid}{ \includegraphics{badges/zenodo.\zid} }36 \end{center}37 38 \vfill39 40 \begin{minipage}{\authorswidth}41 \raggedleft42 \input{authors}43 \end{minipage}\hspace{15pt}\begin{minipage}{0.02\linewidth}44 \rule{1pt}{\rulelenght}45 \end{minipage}\hspace{ 5pt}\begin{minipage}{\abstractwidth}46 \begin{abstract}47 \input{abstract}48 \end{abstract}49 \end{minipage}50 51 \vfill52 53 \begin{center}54 \Large55 \href{http://www.cmcc.it }{ \includegraphics[height=1cm]{logos/CMCC} } \hspace{0.25cm}56 \href{http://www.cnrs.fr }{ \includegraphics[height=1cm]{logos/CNRS} } \hspace{0.25cm}57 \href{http://www.mercator-ocean.fr}{ \includegraphics[height=1cm]{logos/MOI} } \hspace{0.25cm}58 \href{http://www.metoffice.gov.uk }{ \includegraphics[height=1cm]{logos/UKMO} } \hspace{0.25cm}59 \href{http://nerc.ukri.org }{ \includegraphics[height=1cm]{logos/NERC} } \\60 \medskip61 \slshape62 {C}ommunity \hspace{1.5em} {O}cean \hspace{1.5em} {M}odel \\63 \end{center}64 65 \end{titlepage}66 67 \restoregeometry -
NEMO/branches/2019/dev_r11943_MERGE_2019/doc/latex/global/highlighting.tex
r11572 r12182 2 2 %% ============================================================================== 3 3 4 \usepackage[outputdir=../build , chapter, newfloat]{minted}4 \usepackage[outputdir=../build]{minted} 5 5 6 6 %% Global highlighting style 7 7 \definecolor{bg}{HTML}{f8f8f8} 8 8 \usemintedstyle{emacs} 9 \setminted{bgcolor=bg, fontsize=\scriptsize, breaklines }9 \setminted{bgcolor=bg, fontsize=\scriptsize, breaklines, frame=leftline} 10 10 \setminted[xml]{style=borland} %% Specific per language 11 11 … … 22 22 23 23 %% File 24 \newmintedfile[forfile]{fortran}{} 24 \newmintedfile[forfile]{fortran}{} % \forfile{../namelists/nam...} 25 25 26 26 %% Inline 27 \newmintinline[forcode]{fortran}{ bgcolor=, fontsize=auto} % \forcode{...}28 \newmintinline[xmlcode]{xml}{ bgcolor=, fontsize=auto} % \xmlcode{...}29 \newmintinline[snippet]{console}{ bgcolor=, fontsize=auto} % \snippet{...}27 \newmintinline[forcode]{fortran}{fontsize=auto, frame=lines} % \forcode{...} 28 \newmintinline[xmlcode]{xml}{ fontsize=auto, frame=lines} % \xmlcode{...} 29 \newmintinline[snippet]{console}{fontsize=auto, frame=lines} % \snippet{...} 30 30 31 31 %% Namelists inclusion 32 32 \newcommand{\nlst}[1]{\forfile{../../../namelists/#1}} 33 -
NEMO/branches/2019/dev_r11943_MERGE_2019/doc/latex/global/index.ist
r11584 r12182 1 1 headings_flag 1 2 heading_prefix "\\medskip\\hfill\\textnormal{" 3 heading_suffix "}\\hfill\\smallskip\n" 2 heading_prefix "{\\medskip\\hfill\\large\\textsf{\\textbf{" 3 heading_suffix "}}\\hfill}\\medskip\\nopagebreak\n" 4 4 5 delim_0 "\\dotfill~" 6 delim_1 "\\dotfill~" 7 delim_2 "\\dotfill~" 8 -
NEMO/branches/2019/dev_r11943_MERGE_2019/doc/latex/global/info_page.tex
r11515 r12182 2 2 \thispagestyle{plain} 3 3 4 % %================================================================5 % %Disclaimer6 % %================================================================4 % ================================================================ 5 % Disclaimer 6 % ================================================================ 7 7 \subsubsection*{Disclaimer} 8 8 9 9 Like all components of the modelling framework, 10 the \engine \core engine is developed under the \href{http://www.cecill.info}{CECILL license},11 which is a French adaptation of the GNU GPL ( \textbf{G}eneral \textbf{P}ublic \textbf{L}icense).10 the \engine~core engine is developed under the \href{http://www.cecill.info}{CECILL license}, 11 which is a French adaptation of the GNU GPL (General Public License). 12 12 Anyone may use it freely for research purposes, and is encouraged to 13 communicate back to the developmentteam its own developments and improvements.13 communicate back to the NEMO team its own developments and improvements. 14 14 15 15 The model and the present document have been made available as a service to the community. … … 18 18 Users are encouraged to bring them to our attention. 19 19 20 The authors assume no responsibility for problems, errors, or incorrect usage of \NEMO.20 The authors assume no responsibility for problems, errors, or incorrect usage of NEMO. 21 21 22 % %================================================================23 % %External resources24 % %================================================================22 % ================================================================ 23 % External resources 24 % ================================================================ 25 25 \subsubsection*{Other resources} 26 \label{resources}27 26 28 27 Additional information can be found on: 29 28 \begin{itemize} 30 \item \faWordpress\the \href{http://www.nemo-ocean.eu}{website} of the project detailing several29 \item the \href{http://www.nemo-ocean.eu}{website} of the project detailing several 31 30 associated applications and an exhaustive users bibliography 32 \item \faCodeFork\ the \href{http://forge.ipsl.jussieu.fr/nemo}{development platform} of 33 the model with the code repository for the shared reference and some main resources 34 (wiki, ticket system, forums, \ldots) \\ 35 \faGithub\ the \href{http://github.com/NEMO-ocean/NEMO-examples} 36 {repository of the demonstration cases} for research or training 37 \item \faCloudDownload\ the \href{http://zenodo.org/communities/nemo-ocean}{online archive} 38 delivering the publications issued by the consortium (manuals, reports, datasets, \ldots) 39 \item \faEnvelope\ two mailing lists: 31 \item the \href{http://forge.ipsl.jussieu.fr/nemo}{development platform} of the model with 32 the code repository and some main resources (wiki, ticket system, forums, \ldots) 33 \item the \href{http://zenodo.org/communities/nemo-ocean}{online archive} 34 delivering the publications issued by the consortium 35 \item two mailing lists: 40 36 the \href{http://listes.ipsl.fr/sympa/info/nemo-newsletter}{newsletter} for 41 37 top-down communications from the project … … 45 41 \end{itemize} 46 42 47 % %================================================================48 % %Citation49 % %================================================================43 % ================================================================ 44 % Citation 45 % ================================================================ 50 46 \subsubsection*{Citation} 51 47 52 48 Reference for papers and other publications is as follows: 53 49 54 \ medskip50 \vspace{0.5cm} 55 51 56 \begin{sloppypar} 57 ``{\bfseries \heading}\ifdef{\subheading}{ -- \subheading}{}'', 58 {\em Scientific Notes of Climate Modelling Center}, \textbf{\ipslnum} --- ISSN 1288-1619, 59 Institut Pierre-Simon Laplace (IPSL), 60 \href{https://doi.org/10.5281/zenodo.\zid}{doi:10.5281/zenodo.\zid} 61 \end{sloppypar} 52 %% \sloppy: workaround for breaking DOI URL 53 \sloppy 54 ``{\bfseries \heading}'', 55 \firstauthor and \secondauthor, 56 {\em Scientific Notes of Climate Modelling Center}, \textbf{\ipslnum} --- ISSN 1288-1619, 57 Institut Pierre-Simon Laplace (IPSL), 58 \href{https://doi.org/10.5281/zenodo.\zid}{doi:10.5281/zenodo.\zid} 62 59 63 60 \begin{figure}[b] 64 \begin{minipage}[c]{0.7\textwidth} 65 \small 66 \ttfamily{ 67 Scientific Notes of Climate Modelling Center \\ 68 ISSN 1288-1619 \\ 61 \begin{minipage}[c]{0.72\textwidth} 62 \small\ttfamily{Scientific Notes of Climate Modelling Center \\ 63 ISSN 1288-1619 \\ 69 64 Institut Pierre-Simon Laplace (IPSL) 70 65 } … … 75 70 \end{minipage} 76 71 \end{figure} 72 -
NEMO/branches/2019/dev_r11943_MERGE_2019/doc/latex/global/new_cmds.tex
r11693 r12182 2 2 %% ============================================================================== 3 3 4 %% Same slanted font for NEMO and its core engines 5 \newcommand{\NEMO }{\textsl{NEMO}} 6 \newcommand{\OPA }{\textsl{OPA}} 7 \newcommand{\SIcube}{\textsl{SI$^3$}} 8 \newcommand{\TOP }{\textsl{TOP}} 9 \newcommand{\PISCES}{\textsl{PISCES}} 10 \newcommand{\NEMOVAR}{\textsl{NEMOVAR}} 4 %% Include references and index for compilation of single subfile 5 \newcommand{\mtoc}{\minitoc} 6 \newcommand{\biblio}{\bibliography{../main/bibliography}} 7 \newcommand{\pindex}{\printindex} 11 8 12 %% Links for external components 13 \newcommand{\AGRIF}{\href{http://agrif.imag.fr}{AGRIF}} 14 \newcommand{\CICE }{\href{http://github.com/CICE-Consortium/CICE}{CICE}} 15 \newcommand{\OASIS}{\href{http://portal.enes.org/oasis}{OASIS}} 16 \newcommand{\XIOS }{\href{http://forge.ipsl.jussieu.fr/ioserver}{XIOS}} 17 18 %% Fortran in small capitals 19 \newcommand{\fortran}{\textsc{Fortran}} 20 \newcommand{\fninety}{\textsc{Fortran 90}} 9 %% NEMO and Fortran in small capitals 10 \newcommand{\NEMO}{\textsc{nemo}~} 11 \newcommand{\fortran}{\textsc{Fortran}~} 12 \newcommand{\fninety}{\textsc{Fortran 90}~} 21 13 22 14 %% Common aliases … … 26 18 \newcommand{\ztilde}{\ensuremath{\tilde z}} 27 19 \newcommand{\stilde}{\ensuremath{\tilde s}} 28 \newcommand{\ie}{\ensuremath{i.e.} }29 \newcommand{\eg}{\ensuremath{e.g.} }20 \newcommand{\ie}{\ensuremath{i.e.}~} 21 \newcommand{\eg}{\ensuremath{e.g.}~} 30 22 31 23 %% Inline maths … … 33 25 \newcommand{\rdt}{\Delta t} 34 26 35 %% Gurvan's comments36 \newcommand{\ cmtgm}[1]{}27 %% Text env. for Gurvan 28 \newcommand{\gmcomment}[1]{} 37 29 38 30 %% Maths 39 31 \newcommand{\lt}{\left} 40 32 \newcommand{\rt}{\right} 41 \newcommand{\vect}[1]{\ensuremath{ \mathbf{#1}}}33 \newcommand{\vect}[1]{\ensuremath{\mathbf{#1}}} 42 34 \newcommand{\pd}[2][]{\ensuremath{\frac{\partial #1}{\partial #2}}} 43 35 44 %% Convert chapter/section headings to lowercase 45 \renewcommand{\chaptermark}[1]{\markboth{#1}{}} 46 \renewcommand{\sectionmark}[1]{\markright{#1}{}} 47 48 %% Retrieve month name 49 \renewcommand{\today}{ 50 \ifcase \month\or January\or February\or March\or 51 April\or May\or June\or 52 July\or August\or September\or 53 October\or November\or December 54 \fi, \number \year 55 } 56 57 %% Link to orcid profile 58 \newcommand{\orcid}[1]{\href{http://orcid.org/#1}{\textcolor{orcidcolor}\aiOrcidSquare}} 59 60 %% Workaround for \listoffigures 61 \DeclareRobustCommand{\triad}[6][]{\ensuremath{ {}_{#2}^{#3} { \mathbb{#4}_{#1} }_{#5}^{\,#6} }} 62 63 %% New command for ToC 64 \newcommand{\chaptertoc}[1][Table of contents]{% 65 \thispagestyle{empty} 66 \etocsettocstyle{\addsec*{#1}}{}% 67 \localtableofcontents% 68 \vfill 69 } 36 %% Workaround for issue with \listoffigures 37 \DeclareRobustCommand{\triad}[6][]{\ensuremath{{}_{#2}^{#3}{\mathbb{#4}_{#1}}_{#5}^{\,#6}}} -
NEMO/branches/2019/dev_r11943_MERGE_2019/doc/latex/global/packages.tex
r11702 r12182 3 3 %% ============================================================================== 4 4 5 %% 'hyperref' pkg is loaded at the end of the preamble for higher compatibility 5 \usepackage{natbib} %% bib 6 \usepackage{caption} %% caption 7 \usepackage{xcolor} %% color 8 \usepackage{times} %% font 9 \usepackage{enumitem} %% list 10 \usepackage{amsmath} %% maths 11 %\usepackage{fancyhdr} %% page 12 \usepackage{minitoc} %% toc 13 \usepackage{subfiles} %% subdocs 14 \usepackage{draftwatermark} %% watermark 15 \usepackage{titling} %% titlepage 6 16 7 %% KOMA-script 8 \usepackage[footsepline=0.25pt, headsepline=0.25pt]{scrlayer-scrpage} 9 10 %% customization (layout, header/footer styles & contents, background) 11 \usepackage{draftwatermark} 12 \usepackage[margin = 2cm]{geometry} 13 \usepackage[pages = some]{background} %% 'some' for title page 14 \usepackage[Bjornstrup]{fncychap} 15 16 %% Fonts 17 \usepackage{fontspec} 18 %% Issue with fontawesome pkg: path to FontAwesome.otf has to be hard-coded 19 \defaultfontfeatures{ 20 Path = /usr/local/texlive/2019/texmf-dist/fonts/opentype/public/fontawesome/ 21 } 22 \usepackage{academicons, fontawesome, newtxtext} 23 24 %% Formatting 25 \usepackage[inline]{enumitem} 26 \usepackage{etoc, tabularx, xcolor} 27 28 %% Graphics 29 \usepackage{caption, graphicx, grffile} 30 31 %% Labels 32 \usepackage{lastpage, natbib} 33 34 %% Mathematics 35 \usepackage{amsmath, amssymb, mathtools} 36 37 %% Versatility 38 \usepackage{subfiles} 17 %% Extensions in bundle package 18 \usepackage{amssymb, graphicx, tabularx, textcomp} 19 \usepackage[utf8]{inputenc} %% input encoding 39 20 40 21 %% Configuration 41 \graphicspath{ {../../../} {../figures/} } 22 \graphicspath{ {../../figures/} {../../figures/\engine/} } 23 %\captionsetup{margin=10pt, font={small}, labelsep=colon, labelfont={bf}} 24 \renewcommand{\bibfont}{\small} 25 %\renewcommand{\bibsep}{3pt} 42 26 43 %% Missing utmr8a font44 \usepackage{times} -
NEMO/branches/2019/dev_r11943_MERGE_2019/doc/latex/global/styles.tex
r11687 r12182 3 3 %% ============================================================================== 4 4 5 %% Colors 6 \setmanualcolor 7 \colorlet{manualcolorshaded}{manualcolor!60} 8 \definecolor{orcidcolor}{HTML}{A6CE39} 5 %\pagestyle{fancy} 6 \bibliographystyle{../../global/ametsoc} 7 \renewcommand{\bibpreamble}{\begin{multicols}{2}} 8 \renewcommand{\bibpostamble}{\end{multicols}} 9 10 %% Additional fonts 11 \DeclareMathAlphabet{\mathpzc}{OT1}{pzc}{m}{it} 9 12 10 13 %% Page layout 11 \pagestyle{scrheadings} 12 \addtokomafont{pagehead}{ \sffamily } 13 \addtokomafont{pagefoot}{ \sffamily \footnotesize} 14 \addtokomafont{pagenumber}{\sffamily \slshape } 15 \addtokomafont{chapter}{\color{white}} 16 \ohead{} \ofoot{} %% Clear defaults 14 %\fancyhf{} 15 %\fancyhead[LE,RO]{\bfseries\thepage} 16 %\fancyhead[LO]{\bfseries\hspace{-0em}\rightmark} 17 %\renewcommand{\sectionmark}[1]{\markright{\thesection.\ #1}} 18 %\fancyhead[RE]{\bfseries\leftmark} 19 %\renewcommand{\chaptermark}[1]{\markboth{#1}{}} 20 %\renewcommand{\headrulewidth}{0.5pt} 21 %\renewcommand{\footrulewidth}{0pt } 22 %\addtolength{\headheight}{2.6pt} 17 23 18 %% Caption19 \captionsetup{font = footnotesize, justification = justified}20 21 %% Footnote22 \renewcommand{\thefootnote}{\fnsymbol{footnote}}23 24 %% Bibliography25 \bibliographystyle{../../global/ametsoc}26 \renewcommand{\bibfont}{\small}27 \renewcommand{\bibpreamble }{\begin{multicols}{2}}28 \renewcommand{\bibpostamble}{ \end{multicols} }29 24 30 25 %% Catcodes 31 \makeatletter 26 %\makeatletter 27 %\def\LigneVerticale{\vrule height 5cm depth 2cm\hspace{0.1cm}\relax} 28 %\def\LignesVerticales{\let\LV\LigneVerticale\LV\LV\LV\LV\LV\LV\LV\LV\LV\LV} 29 %\def\GrosCarreAvecUnChiffre#1{ 30 % \rlap{\vrule height 0.8cm width 1cm depth 0.2cm} 31 % \rlap{\hbox to 1cm{\hss\mbox{\color{white} #1}\hss}} 32 % \vrule height 0pt width 1cm depth 0pt 33 %} 34 %\def\@makechapterhead#1{ 35 % \hbox{ 36 % \huge\LignesVerticales\hspace{-0.5cm} 37 % \GrosCarreAvecUnChiffre{\thechapter}\hspace{0.2cm} 38 % \hbox{#1} 39 % } 40 % \par\vskip 41 %1cm 42 %} 43 %\def\@makeschapterhead#1{ 44 % \hbox{ 45 % \huge\LignesVerticales 46 % \hbox{#1} 47 % } 48 % \par\vskip 49 %2cm 50 %} 51 %\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else 52 % \hbox{} 53 % \vspace*{\fill} 54 % \vspace{\fill} 55 % \thispagestyle{empty} 56 % \newpage 57 % \if@twocolumn\hbox{}\newpage\fi\fi\fi} 58 %\def\@seccntformat#1{\protect\makebox[0pt][r]{\csname the#1\endcsname\quad}} 59 %\makeatother 32 60 33 %% Prevent error with tikz and namelist inclusion34 \global\let\tikz@ensure@dollar@catcode=\relax35 61 36 %% First page37 \backgroundsetup{38 firstpage = true,39 scale = 1, angle = 0, opacity = 1,40 contents = {41 \begin{tikzpicture}[remember picture, overlay]42 \path [fill = manualcolor] (-0.5\paperwidth, 7) rectangle (0.5\paperwidth, 10);43 \end{tikzpicture}44 }45 }46 47 %% Apply engine color for chapter headings: tweaking snippets from fncychap.sty48 \renewcommand{\DOCH}{%49 \settowidth{\py}{\CNoV\thechapter}50 \addtolength{\py}{-10pt} % Amount of space by which the51 % % number is shifted right52 \fboxsep=0pt%53 \colorbox{manualcolor}{\rule{0pt}{40pt}\parbox[b]{\textwidth}{\hfill}}%54 \kern-\py\raise20pt%55 \hbox{\color{manualcolorshaded}\CNoV\thechapter}\\%56 }57 \renewcommand{\DOTI}[1]{%58 \nointerlineskip\raggedright%59 \fboxsep=\myhi%60 \vskip-1ex%61 \colorbox{manualcolor}{\parbox[t]{\mylen}{\color{white}\CTV\FmTi{#1}}}\par\nobreak%62 \vskip 40\p@%63 }64 \renewcommand{\DOTIS}[1]{%65 \fboxsep=0pt66 \colorbox{manualcolor}{\rule{0pt}{40pt}\parbox[b]{\textwidth}{\hfill}}\\%67 \nointerlineskip\raggedright%68 \fboxsep=\myhi%69 \vskip-1ex% Remove white 1pt line70 \colorbox{manualcolor}{\parbox[t]{\mylen}{\color{white}\CTV\FmTi{#1}}}\par\nobreak%71 \vskip 40\p@%72 }73 74 %% Temporary fix75 \def\set@curr@file#1{%76 \begingroup77 \escapechar\m@ne78 \xdef\@curr@file{\expandafter\string\csname #1\endcsname}%79 \endgroup80 }81 \def\quote@name#1{"\quote@@name#1\@gobble""}82 \def\quote@@name#1"{#1\quote@@name}83 \def\unquote@name#1{\quote@@name#1\@gobble"}84 85 \makeatother -
NEMO/branches/2019/dev_r11943_MERGE_2019/doc/namelists/namsbc_blk
r11703 r12182 1 1 !----------------------------------------------------------------------- 2 &namsbc_blk ! namsbc_blk generic Bulk formula 2 &namsbc_blk ! namsbc_blk generic Bulk formula (ln_blk =T) 3 3 !----------------------------------------------------------------------- 4 4 ! ! bulk algorithm : 5 ln_NCAR = .false.! "NCAR" algorithm (Large and Yeager 2008)5 ln_NCAR = .true. ! "NCAR" algorithm (Large and Yeager 2008) 6 6 ln_COARE_3p0 = .false. ! "COARE 3.0" algorithm (Fairall et al. 2003) 7 ln_COARE_3p 5 = .false. ! "COARE 3.5" algorithm (Edson et al. 2013)8 ln_ECMWF = .false. ! "ECMWF" algorithm (IFS cycle 31)7 ln_COARE_3p6 = .false. ! "COARE 3.6" algorithm (Edson et al. 2013) 8 ln_ECMWF = .false. ! "ECMWF" algorithm (IFS cycle 45r1) 9 9 ! 10 rn_zqt = 10. ! Air temperature & humidity reference height (m) 11 rn_zu = 10. ! Wind vector reference height (m) 12 ln_Cd_L12 = .false. ! air-ice drags = F(ice concentration) (Lupkes et al. 2012) 13 ln_Cd_L15 = .false. ! air-ice drags = F(ice concentration) (Lupkes et al. 2015) 14 ln_taudif = .false. ! HF tau contribution: use "mean of stress module - module of the mean stress" data 15 rn_pfac = 1. ! multiplicative factor for precipitation (total & snow) 16 rn_efac = 1. ! multiplicative factor for evaporation (0. or 1.) 17 rn_vfac = 0. ! multiplicative factor for ocean & ice velocity used to 18 ! ! calculate the wind stress (0.=absolute or 1.=relative winds) 19 10 rn_zqt = 10. ! Air temperature & humidity reference height (m) 11 rn_zu = 10. ! Wind vector reference height (m) 12 ln_Cd_L12 = .false. ! air-ice drags = F(ice conc.) (Lupkes et al. 2012) 13 ln_Cd_L15 = .false. ! air-ice drags = F(ice conc.) (Lupkes et al. 2015) 14 ! ! - module of the mean stress" data 15 rn_pfac = 1. ! multipl. factor for precipitation (total & snow) 16 rn_efac = 1. ! multipl. factor for evaporation (0. or 1.) 17 rn_vfac = 0. ! multipl. factor for ocean & ice velocity 18 ! ! used to calculate the wind stress 19 ! ! (0. => absolute or 1. => relative winds) 20 ln_skin_cs = .false. ! use the cool-skin parameterization 21 ln_skin_wl = .false. ! use the warm-layer parameterization 22 ! ! ==> only available in ECMWF and COARE algorithms 23 ln_humi_sph = .true. ! humidity "sn_humi" is specific humidity [kg/kg] 24 ln_humi_dpt = .false. ! humidity "sn_humi" is dew-point temperature [K] 25 ln_humi_rlh = .false. ! humidity "sn_humi" is relative humidity [%] 26 ! 20 27 cn_dir = './' ! root directory for the bulk data location 21 28 !___________!_________________________!___________________!___________!_____________!________!___________!______________________________________!__________!_______________! … … 28 35 sn_tair = 't_10.15JUNE2009_fill' , 6. , 'T_10_MOD', .false. , .true. , 'yearly' , 'weights_core_orca2_bilinear_noc.nc' , '' , '' 29 36 sn_humi = 'q_10.15JUNE2009_fill' , 6. , 'Q_10_MOD', .false. , .true. , 'yearly' , 'weights_core_orca2_bilinear_noc.nc' , '' , '' 37 sn_hpgi = 'NONE' , 24. , 'uhpg' , .false. , .false., 'monthly' , 'weights_ERAI3D_F128_2_ORCA2_bicubic', 'UG' , '' 38 sn_hpgj = 'NONE' , 24. , 'vhpg' , .false. , .false., 'monthly' , 'weights_ERAI3D_F128_2_ORCA2_bicubic', 'VG' , '' 30 39 sn_prec = 'ncar_precip.15JUNE2009_fill', -1. , 'PRC_MOD1', .false. , .true. , 'yearly' , 'weights_core_orca2_bilinear_noc.nc' , '' , '' 31 40 sn_snow = 'ncar_precip.15JUNE2009_fill', -1. , 'SNOW' , .false. , .true. , 'yearly' , 'weights_core_orca2_bilinear_noc.nc' , '' , '' 32 41 sn_slp = 'slp.15JUNE2009_fill' , 6. , 'SLP' , .false. , .true. , 'yearly' , 'weights_core_orca2_bilinear_noc.nc' , '' , '' 33 sn_tdif = 'taudif_core' , 24 , 'taudif' , .false. , .true. , 'yearly' , 'weights_core_orca2_bilinear_noc.nc' , '' , ''34 42 / -
NEMO/branches/2019/dev_r11943_MERGE_2019/src/ICE/icesbc.F90
r11960 r12182 27 27 USE lbclnk ! lateral boundary conditions (or mpp links) 28 28 USE timing ! Timing 29 USE fldread !!GS: needed by agrif 29 30 30 31 IMPLICIT NONE … … 71 72 SELECT CASE( ksbc ) 72 73 CASE( jp_usr ) ; CALL usrdef_sbc_ice_tau( kt ) ! user defined formulation 73 CASE( jp_blk ) ; CALL blk_ice_tau ! Bulk formulation 74 CASE( jp_blk ) ; CALL blk_ice_1( sf(jp_wndi)%fnow(:,:,1), sf(jp_wndj)%fnow(:,:,1), & 75 & sf(jp_tair)%fnow(:,:,1), sf(jp_humi)%fnow(:,:,1), & 76 & sf(jp_slp )%fnow(:,:,1), u_ice, v_ice, tm_su , & ! inputs 77 & putaui = utau_ice, pvtaui = vtau_ice ) ! outputs 78 ! CASE( jp_abl ) utau_ice & vtau_ice are computed in ablmod 74 79 CASE( jp_purecpl ) ; CALL sbc_cpl_ice_tau( utau_ice , vtau_ice ) ! Coupled formulation 75 80 END SELECT … … 143 148 CASE( jp_usr ) !--- user defined formulation 144 149 CALL usrdef_sbc_ice_flx( kt, h_s, h_i ) 145 CASE( jp_blk ) !--- bulk formulation 146 CALL blk_ice_flx ( t_su, h_s, h_i, alb_ice ) ! 150 CASE( jp_blk, jp_abl ) !--- bulk formulation & ABL formulation 151 CALL blk_ice_2 ( t_su, h_s, h_i, alb_ice, sf(jp_tair)%fnow(:,:,1), sf(jp_humi)%fnow(:,:,1), & 152 & sf(jp_slp)%fnow(:,:,1), sf(jp_qlw)%fnow(:,:,1), sf(jp_prec)%fnow(:,:,1), sf(jp_snow)%fnow(:,:,1) ) ! 147 153 IF( ln_mixcpl ) CALL sbc_cpl_ice_flx( picefr=at_i_b, palbi=alb_ice, psst=sst_m, pist=t_su, phs=h_s, phi=h_i ) 148 154 IF( nn_flxdist /= -1 ) CALL ice_flx_dist ( t_su, alb_ice, qns_ice, qsr_ice, dqns_ice, evap_ice, devap_ice, nn_flxdist ) -
NEMO/branches/2019/dev_r11943_MERGE_2019/src/ICE/icevar.F90
r11732 r12182 115 115 ! 116 116 ato_i(:,:) = 1._wp - at_i(:,:) ! open water fraction 117 117 ! 118 !!GS: tm_su always needed by ABL over sea-ice 119 ALLOCATE( z1_at_i(jpi,jpj) ) 120 WHERE( at_i(:,:) > epsi20 ) ; z1_at_i(:,:) = 1._wp / at_i(:,:) 121 ELSEWHERE ; z1_at_i(:,:) = 0._wp 122 END WHERE 123 tm_su(:,:) = SUM( t_su(:,:,:) * a_i(:,:,:) , dim=3 ) * z1_at_i(:,:) 124 WHERE( at_i(:,:)<=epsi20 ) tm_su(:,:) = rt0 125 ! 118 126 ! The following fields are calculated for diagnostics and outputs only 119 127 ! ==> Do not use them for other purposes 120 128 IF( kn > 1 ) THEN 121 129 ! 122 ALLOCATE( z1_at_i(jpi,jpj) , z1_vt_i(jpi,jpj) , z1_vt_s(jpi,jpj) ) 123 WHERE( at_i(:,:) > epsi20 ) ; z1_at_i(:,:) = 1._wp / at_i(:,:) 124 ELSEWHERE ; z1_at_i(:,:) = 0._wp 125 END WHERE 130 ALLOCATE( z1_vt_i(jpi,jpj) , z1_vt_s(jpi,jpj) ) 126 131 WHERE( vt_i(:,:) > epsi20 ) ; z1_vt_i(:,:) = 1._wp / vt_i(:,:) 127 132 ELSEWHERE ; z1_vt_i(:,:) = 0._wp … … 136 141 ! 137 142 ! ! mean temperature (K), salinity and age 138 tm_su(:,:) = SUM( t_su(:,:,:) * a_i(:,:,:) , dim=3 ) * z1_at_i(:,:)139 143 tm_si(:,:) = SUM( t_si(:,:,:) * a_i(:,:,:) , dim=3 ) * z1_at_i(:,:) 140 144 om_i (:,:) = SUM( oa_i(:,:,:) , dim=3 ) * z1_at_i(:,:) … … 154 158 ! ! put rt0 where there is no ice 155 159 WHERE( at_i(:,:)<=epsi20 ) 156 tm_su(:,:) = rt0157 160 tm_si(:,:) = rt0 158 161 tm_i (:,:) = rt0 … … 165 168 END WHERE 166 169 ! 167 DEALLOCATE( z1_ at_i , z1_vt_i , z1_vt_s )170 DEALLOCATE( z1_vt_i , z1_vt_s ) 168 171 ! 169 172 ENDIF 173 ! 174 DEALLOCATE( z1_at_i ) 170 175 ! 171 176 END SUBROUTINE ice_var_agg -
NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/DIA/diawri.F90
r12150 r12182 28 28 USE isf_oce 29 29 USE isfcpl 30 USE abl ! abl variables in case ln_abl = .true. 30 31 USE dom_oce ! ocean space and time domain 31 32 USE phycst ! physical constants … … 68 69 PUBLIC dia_wri_state 69 70 PUBLIC dia_wri_alloc ! Called by nemogcm module 70 71 #if ! defined key_iomput 72 PUBLIC dia_wri_alloc_abl ! Called by sbcabl module (if ln_abl = .true.) 73 #endif 71 74 INTEGER :: nid_T, nz_T, nh_T, ndim_T, ndim_hT ! grid_T file 72 75 INTEGER :: nb_T , ndim_bT ! grid_T file … … 74 77 INTEGER :: nid_V, nz_V, nh_V, ndim_V, ndim_hV ! grid_V file 75 78 INTEGER :: nid_W, nz_W, nh_W ! grid_W file 79 INTEGER :: nid_A, nz_A, nh_A, ndim_A, ndim_hA ! grid_ABL file 76 80 INTEGER :: ndex(1) ! ??? 77 81 INTEGER, SAVE, ALLOCATABLE, DIMENSION(:) :: ndex_hT, ndex_hU, ndex_hV 82 INTEGER, SAVE, ALLOCATABLE, DIMENSION(:) :: ndex_hA, ndex_A ! ABL 78 83 INTEGER, SAVE, ALLOCATABLE, DIMENSION(:) :: ndex_T, ndex_U, ndex_V 79 84 INTEGER, SAVE, ALLOCATABLE, DIMENSION(:) :: ndex_bT … … 417 422 & ndex_hV(jpi*jpj) , ndex_V(jpi*jpj*jpk) , STAT=ierr(1) ) 418 423 ! 419 424 dia_wri_alloc = MAXVAL(ierr) 420 425 CALL mpp_sum( 'diawri', dia_wri_alloc ) 421 426 ! 422 427 END FUNCTION dia_wri_alloc 428 429 INTEGER FUNCTION dia_wri_alloc_abl() 430 !!---------------------------------------------------------------------- 431 ALLOCATE( ndex_hA(jpi*jpj), ndex_A (jpi*jpj*jpkam1), STAT=dia_wri_alloc_abl) 432 CALL mpp_sum( 'diawri', dia_wri_alloc_abl ) 433 ! 434 END FUNCTION dia_wri_alloc_abl 423 435 424 436 … … 444 456 INTEGER :: ierr ! error code return from allocation 445 457 INTEGER :: iimi, iima, ipk, it, itmod, ijmi, ijma ! local integers 458 INTEGER :: ipka ! ABL 446 459 INTEGER :: jn, ierror ! local integers 447 460 REAL(wp) :: zsto, zout, zmax, zjulian ! local scalars … … 449 462 REAL(wp), DIMENSION(jpi,jpj) :: zw2d ! 2D workspace 450 463 REAL(wp), DIMENSION(jpi,jpj,jpk) :: zw3d ! 3D workspace 464 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: zw3d_abl ! ABL 3D workspace 451 465 !!---------------------------------------------------------------------- 452 466 ! … … 482 496 ijmi = 1 ; ijma = jpj 483 497 ipk = jpk 498 IF(ln_abl) ipka = jpkam1 484 499 485 500 ! define time axis … … 584 599 & "m", ipk, gdepw_1d, nz_W, "down" ) 585 600 601 IF( ln_abl ) THEN 602 ! Define the ABL grid FILE ( nid_A ) 603 CALL dia_nam( clhstnam, nn_write, 'grid_ABL' ) 604 IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam ! filename 605 CALL histbeg( clhstnam, jpi, glamt, jpj, gphit, & ! Horizontal grid: glamt and gphit 606 & iimi, iima-iimi+1, ijmi, ijma-ijmi+1, & 607 & nit000-1, zjulian, rdt, nh_A, nid_A, domain_id=nidom, snc4chunks=snc4set ) 608 CALL histvert( nid_A, "ght_abl", "Vertical T levels", & ! Vertical grid: gdept 609 & "m", ipka, ght_abl(2:jpka), nz_A, "up" ) 610 ! ! Index of ocean points 611 ALLOCATE( zw3d_abl(jpi,jpj,ipka) ) 612 zw3d_abl(:,:,:) = 1._wp 613 CALL wheneq( jpi*jpj*ipka, zw3d_abl, 1, 1., ndex_A , ndim_A ) ! volume 614 CALL wheneq( jpi*jpj , zw3d_abl, 1, 1., ndex_hA, ndim_hA ) ! surface 615 DEALLOCATE(zw3d_abl) 616 ENDIF 586 617 587 618 ! Declare all the output fields as NETCDF variables … … 633 664 CALL histdef( nid_T, "sowindsp", "wind speed at 10m" , "m/s" , & ! wndm 634 665 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 635 ! 666 ! 667 IF( ln_abl ) THEN 668 CALL histdef( nid_A, "t_abl", "Potential Temperature" , "K" , & ! t_abl 669 & jpi, jpj, nh_A, ipka, 1, ipka, nz_A, 32, clop, zsto, zout ) 670 CALL histdef( nid_A, "q_abl", "Humidity" , "kg/kg" , & ! q_abl 671 & jpi, jpj, nh_A, ipka, 1, ipka, nz_A, 32, clop, zsto, zout ) 672 CALL histdef( nid_A, "u_abl", "Atmospheric U-wind " , "m/s" , & ! u_abl 673 & jpi, jpj, nh_A, ipka, 1, ipka, nz_A, 32, clop, zsto, zout ) 674 CALL histdef( nid_A, "v_abl", "Atmospheric V-wind " , "m/s" , & ! v_abl 675 & jpi, jpj, nh_A, ipka, 1, ipka, nz_A, 32, clop, zsto, zout ) 676 CALL histdef( nid_A, "tke_abl", "Atmospheric TKE " , "m2/s2" , & ! tke_abl 677 & jpi, jpj, nh_A, ipka, 1, ipka, nz_A, 32, clop, zsto, zout ) 678 CALL histdef( nid_A, "avm_abl", "Atmospheric turbulent viscosity", "m2/s" , & ! avm_abl 679 & jpi, jpj, nh_A, ipka, 1, ipka, nz_A, 32, clop, zsto, zout ) 680 CALL histdef( nid_A, "avt_abl", "Atmospheric turbulent diffusivity", "m2/s2", & ! avt_abl 681 & jpi, jpj, nh_A, ipka, 1, ipka, nz_A, 32, clop, zsto, zout ) 682 CALL histdef( nid_A, "pblh", "Atmospheric boundary layer height " , "m", & ! pblh 683 & jpi, jpj, nh_A, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 684 #if defined key_si3 685 CALL histdef( nid_A, "oce_frac", "Fraction of open ocean" , " ", & ! ato_i 686 & jpi, jpj, nh_A, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 687 #endif 688 CALL histend( nid_A, snc4chunks=snc4set ) 689 ENDIF 690 ! 636 691 IF( ln_icebergs ) THEN 637 692 CALL histdef( nid_T, "calving" , "calving mass input" , "kg/s" , & … … 791 846 CALL histwrite( nid_T, "soicecov", it, fr_i , ndim_hT, ndex_hT ) ! ice fraction 792 847 CALL histwrite( nid_T, "sowindsp", it, wndm , ndim_hT, ndex_hT ) ! wind speed 793 ! 848 ! 849 IF( ln_abl ) THEN 850 ALLOCATE( zw3d_abl(jpi,jpj,jpka) ) 851 IF( ln_mskland ) THEN 852 DO jk=1,jpka 853 zw3d_abl(:,:,jk) = tmask(:,:,1) 854 END DO 855 ELSE 856 zw3d_abl(:,:,:) = 1._wp 857 ENDIF 858 CALL histwrite( nid_A, "pblh" , it, pblh(:,:) *zw3d_abl(:,:,1 ), ndim_hA, ndex_hA ) ! pblh 859 CALL histwrite( nid_A, "u_abl" , it, u_abl (:,:,2:jpka,nt_n )*zw3d_abl(:,:,2:jpka), ndim_A , ndex_A ) ! u_abl 860 CALL histwrite( nid_A, "v_abl" , it, v_abl (:,:,2:jpka,nt_n )*zw3d_abl(:,:,2:jpka), ndim_A , ndex_A ) ! v_abl 861 CALL histwrite( nid_A, "t_abl" , it, tq_abl (:,:,2:jpka,nt_n,1)*zw3d_abl(:,:,2:jpka), ndim_A , ndex_A ) ! t_abl 862 CALL histwrite( nid_A, "q_abl" , it, tq_abl (:,:,2:jpka,nt_n,2)*zw3d_abl(:,:,2:jpka), ndim_A , ndex_A ) ! q_abl 863 CALL histwrite( nid_A, "tke_abl", it, tke_abl (:,:,2:jpka,nt_n )*zw3d_abl(:,:,2:jpka), ndim_A , ndex_A ) ! tke_abl 864 CALL histwrite( nid_A, "avm_abl", it, avm_abl (:,:,2:jpka )*zw3d_abl(:,:,2:jpka), ndim_A , ndex_A ) ! avm_abl 865 CALL histwrite( nid_A, "avt_abl", it, avt_abl (:,:,2:jpka )*zw3d_abl(:,:,2:jpka), ndim_A , ndex_A ) ! avt_abl 866 #if defined key_si3 867 CALL histwrite( nid_A, "oce_frac" , it, ato_i(:,:) , ndim_hA, ndex_hA ) ! ato_i 868 #endif 869 DEALLOCATE(zw3d_abl) 870 ENDIF 871 ! 794 872 IF( ln_icebergs ) THEN 795 873 ! … … 861 939 CALL histclo( nid_V ) 862 940 CALL histclo( nid_W ) 941 IF(ln_abl) CALL histclo( nid_A ) 863 942 ENDIF 864 943 ! … … 883 962 INTEGER , INTENT( in ) :: Kmm ! time level index 884 963 CHARACTER (len=* ), INTENT( in ) :: cdfile_name ! name of the file created 885 REAL(wp), DIMENSION(jpi,jpj,jpk) :: zisfdebug886 964 !! 887 965 INTEGER :: inum, jk … … 955 1033 CALL iom_rstput( 0, 0, inum, 'sdvecrtz', wsd ) ! now StokesDrift k-velocity 956 1034 ENDIF 1035 IF ( ln_abl ) THEN 1036 CALL iom_rstput ( 0, 0, inum, "uz1_abl", u_abl(:,:,2,nt_a ) ) ! now first level i-wind 1037 CALL iom_rstput ( 0, 0, inum, "vz1_abl", v_abl(:,:,2,nt_a ) ) ! now first level j-wind 1038 CALL iom_rstput ( 0, 0, inum, "tz1_abl", tq_abl(:,:,2,nt_a,1) ) ! now first level temperature 1039 CALL iom_rstput ( 0, 0, inum, "qz1_abl", tq_abl(:,:,2,nt_a,2) ) ! now first level humidity 1040 ENDIF 957 1041 958 1042 #if defined key_si3 -
NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/IOM/in_out_manager.F90
r11960 r12182 87 87 LOGICAL :: lrst_oce !: logical to control the oce restart write 88 88 LOGICAL :: lrst_ice !: logical to control the ice restart write 89 LOGICAL :: lrst_abl !: logical to control the abl restart write 89 90 INTEGER :: numror = 0 !: logical unit for ocean restart (read). Init to 0 is needed for SAS (in daymod.F90) 90 91 INTEGER :: numrir !: logical unit for ice restart (read) 92 INTEGER :: numrar !: logical unit for abl restart (read) 91 93 INTEGER :: numrow !: logical unit for ocean restart (write) 92 94 INTEGER :: numriw !: logical unit for ice restart (write) 95 INTEGER :: numraw !: logical unit for abl restart (write) 93 96 INTEGER :: nrst_lst !: number of restart to output next 94 97 -
NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/IOM/iom.F90
r12150 r12182 29 29 USE lib_mpp ! MPP library 30 30 #if defined key_iomput 31 USE sbc_oce , ONLY : nn_fsbc ! ocean space and time domain31 USE sbc_oce , ONLY : nn_fsbc, ght_abl, ghw_abl, e3t_abl, e3w_abl, jpka, jpkam1 32 32 USE icb_oce , ONLY : nclasses, class_num ! !: iceberg classes 33 33 #if defined key_si3 … … 111 111 ! 112 112 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zt_bnds, zw_bnds 113 REAL(wp), DIMENSION(2,jpkam1) :: za_bnds ! ABL vertical boundaries 113 114 LOGICAL :: ll_tmppatch = .TRUE. !: seb: patch before we remove periodicity 114 115 INTEGER :: nldi_save, nlei_save !: and close boundaries in output files … … 194 195 ! vertical grid definition 195 196 IF(.NOT.llrst_context) THEN 196 CALL iom_set_axis_attr( "deptht", paxis = gdept_1d ) 197 CALL iom_set_axis_attr( "depthu", paxis = gdept_1d ) 198 CALL iom_set_axis_attr( "depthv", paxis = gdept_1d ) 199 CALL iom_set_axis_attr( "depthw", paxis = gdepw_1d ) 200 197 CALL iom_set_axis_attr( "deptht", paxis = gdept_1d ) 198 CALL iom_set_axis_attr( "depthu", paxis = gdept_1d ) 199 CALL iom_set_axis_attr( "depthv", paxis = gdept_1d ) 200 CALL iom_set_axis_attr( "depthw", paxis = gdepw_1d ) 201 202 ! ABL 203 IF( .NOT. ALLOCATED(ght_abl) ) THEN ! force definition for xml files (xios) 204 ALLOCATE( ght_abl(jpka), ghw_abl(jpka), e3t_abl(jpka), e3w_abl(jpka) ) ! default allocation needed by iom 205 ght_abl(:) = -1._wp ; ghw_abl(:) = -1._wp 206 e3t_abl(:) = -1._wp ; e3w_abl(:) = -1._wp 207 ENDIF 208 CALL iom_set_axis_attr( "ght_abl", ght_abl(2:jpka) ) 209 CALL iom_set_axis_attr( "ghw_abl", ghw_abl(2:jpka) ) 210 201 211 ! Add vertical grid bounds 202 212 jkmin = MIN(2,jpk) ! in case jpk=1 (i.e. sas2D) … … 207 217 zw_bnds(2,1:jpkm1 ) = gdepw_1d(jkmin:jpk) 208 218 zw_bnds(2,jpk: ) = gdepw_1d(jpk) + e3t_1d(jpk) 209 CALL iom_set_axis_attr( "deptht", bounds=zw_bnds ) 210 CALL iom_set_axis_attr( "depthu", bounds=zw_bnds ) 211 CALL iom_set_axis_attr( "depthv", bounds=zw_bnds ) 212 CALL iom_set_axis_attr( "depthw", bounds=zt_bnds ) 219 CALL iom_set_axis_attr( "deptht", bounds=zw_bnds ) 220 CALL iom_set_axis_attr( "depthu", bounds=zw_bnds ) 221 CALL iom_set_axis_attr( "depthv", bounds=zw_bnds ) 222 CALL iom_set_axis_attr( "depthw", bounds=zt_bnds ) 223 224 ! ABL 225 za_bnds(1,:) = ghw_abl(1:jpkam1) 226 za_bnds(2,:) = ghw_abl(2:jpka ) 227 CALL iom_set_axis_attr( "ght_abl", bounds=za_bnds ) 228 za_bnds(1,:) = ght_abl(2:jpka ) 229 za_bnds(2,:) = ght_abl(2:jpka ) + e3w_abl(2:jpka) 230 CALL iom_set_axis_attr( "ghw_abl", bounds=za_bnds ) 231 213 232 CALL iom_set_axis_attr( "nfloat", (/ (REAL(ji,wp), ji=1,jpnfl) /) ) 214 233 # if defined key_si3 … … 682 701 clname = trim(cdname) 683 702 IF ( .NOT. Agrif_Root() .AND. .NOT. lliof ) THEN 684 !FUS iln = INDEX(clname,'/') 685 iln = INDEX(clname,'/',BACK=.true.) ! FUS: to insert the nest index at the right location within the string, the last / has to be found (search from the right to left) 703 iln = INDEX(clname,'/') 686 704 cltmpn = clname(1:iln) 687 705 clname = clname(iln+1:LEN_TRIM(clname)) … … 1128 1146 WRITE(cldmspc , fmt='(i1)') idmspc 1129 1147 ! 1130 IF( idmspc < irankpv ) THEN 1131 CALL ctl_stop( TRIM(clinfo), 'The file has only '//cldmspc//' spatial dimension', & 1132 & 'it is impossible to read a '//clrankpv//'D array from this file...' ) 1133 ELSEIF( idmspc == irankpv ) THEN 1148 !!GS: we consider 2D data as 3D data with vertical dim size = 1 1149 !IF( idmspc < irankpv ) THEN 1150 ! CALL ctl_stop( TRIM(clinfo), 'The file has only '//cldmspc//' spatial dimension', & 1151 ! & 'it is impossible to read a '//clrankpv//'D array from this file...' ) 1152 !ELSEIF( idmspc == irankpv ) THEN 1153 IF( idmspc == irankpv ) THEN 1134 1154 IF( PRESENT(pv_r1d) .AND. idom /= jpdom_unknown ) & 1135 1155 & CALL ctl_stop( TRIM(clinfo), 'case not coded...You must use jpdom_unknown' ) … … 1929 1949 ! 1930 1950 INTEGER :: ji, jj, jn, ni, nj 1931 INTEGER :: icnr, jcnr 1932 ! 1951 INTEGER :: icnr, jcnr ! Offset such that the vertex coordinate (i+icnr,j+jcnr) 1952 ! ! represents the bottom-left corner of cell (i,j) 1933 1953 REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:) :: z_bnds ! Lat/lon coordinates of the vertices of cell (i,j) 1934 1954 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: z_fld ! Working array to determine where to rotate cells … … 2101 2121 f_op%timestep = nn_fsbc ; f_of%timestep = 0 ; CALL iom_set_field_attr('SBC' , freq_op=f_op, freq_offset=f_of) 2102 2122 f_op%timestep = nn_fsbc ; f_of%timestep = 0 ; CALL iom_set_field_attr('SBC_scalar' , freq_op=f_op, freq_offset=f_of) 2103 f_op%timestep = 1 ; f_of%timestep = 0 ; CALL iom_set_field_attr('ptrc_T' , freq_op=f_op, freq_offset=f_of) 2104 f_op%timestep = 1 ; f_of%timestep = 0 ; CALL iom_set_field_attr('diad_T' , freq_op=f_op, freq_offset=f_of) 2123 f_op%timestep = nn_fsbc ; f_of%timestep = 0 ; CALL iom_set_field_attr('ABL' , freq_op=f_op, freq_offset=f_of) 2105 2124 2106 2125 ! output file names (attribut: name) … … 2227 2246 CHARACTER(LEN=20) :: clfreq 2228 2247 CHARACTER(LEN=20) :: cldate 2229 CHARACTER(LEN=256) :: cltmpn !FUS needed for correct path with AGRIF2230 INTEGER :: iln !FUS needed for correct path with AGRIF2231 2248 INTEGER :: idx 2232 2249 INTEGER :: jn … … 2311 2328 END DO 2312 2329 ! 2313 !FUS IF( jn == 1 .AND. TRIM(Agrif_CFixed()) /= '0' ) clname = TRIM(Agrif_CFixed())//"_"//TRIM(clname) 2314 !FUS see comment line 700 2315 IF( jn == 1 .AND. TRIM(Agrif_CFixed()) /= '0' ) THEN 2316 iln = INDEX(clname,'/',BACK=.true.) 2317 cltmpn = clname(1:iln) 2318 clname = clname(iln+1:LEN_TRIM(clname)) 2319 clname = TRIM(cltmpn)//TRIM(Agrif_CFixed())//'_'//TRIM(clname) 2320 ENDIF 2321 !FUS 2330 IF( jn == 1 .AND. TRIM(Agrif_CFixed()) /= '0' ) clname = TRIM(Agrif_CFixed())//"_"//TRIM(clname) 2322 2331 IF( jn == 1 ) CALL iom_set_file_attr( cdid, name = clname ) 2323 2332 IF( jn == 2 ) CALL iom_set_file_attr( cdid, name_suffix = clname ) -
NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/IOM/iom_nf90.F90
r11536 r12182 19 19 !!---------------------------------------------------------------------- 20 20 USE dom_oce ! ocean space and time domain 21 USE sbc_oce, ONLY: jpka, ght_abl ! abl vertical level number and height 21 22 USE lbclnk ! lateal boundary condition / mpp exchanges 22 23 USE iom_def ! iom variables definitions … … 56 57 LOGICAL , INTENT(in ) :: ldok ! check the existence 57 58 INTEGER, DIMENSION(2,5), INTENT(in ), OPTIONAL :: kdompar ! domain parameters: 58 INTEGER , INTENT(in ), OPTIONAL :: kdlev ! size of the third dimension59 INTEGER , INTENT(in ), OPTIONAL :: kdlev ! size of the ice/abl third dimension 59 60 60 61 CHARACTER(LEN=256) :: clinfo ! info character … … 69 70 INTEGER :: ihdf5 ! local variable for retrieval of value for NF90_HDF5 70 71 LOGICAL :: llclobber ! local definition of ln_clobber 71 INTEGER :: ilevels 72 INTEGER :: ilevels ! vertical levels 72 73 !--------------------------------------------------------------------- 73 74 ! … … 76 77 ! 77 78 ! !number of vertical levels 78 IF( PRESENT(kdlev) ) THEN ; ilevels = kdlev ! use input value (useful for sea-ice)79 ELSE ; ilevels = jpk ! by default jpk79 IF( PRESENT(kdlev) ) THEN ; ilevels = kdlev ! use input value (useful for sea-ice and abl) 80 ELSE ; ilevels = jpk ! by default jpk 80 81 ENDIF 81 82 ! … … 126 127 CALL iom_nf90_check(NF90_DEF_DIM( if90id, 'x', kdompar(1,1), idmy ), clinfo) 127 128 CALL iom_nf90_check(NF90_DEF_DIM( if90id, 'y', kdompar(2,1), idmy ), clinfo) 128 CALL iom_nf90_check(NF90_DEF_DIM( if90id, 'nav_lev', jpk, idmy ), clinfo) 129 CALL iom_nf90_check(NF90_DEF_DIM( if90id, 'time_counter', NF90_UNLIMITED, idmy ), clinfo) 130 IF( PRESENT(kdlev) ) & 131 CALL iom_nf90_check(NF90_DEF_DIM( if90id, 'numcat', kdlev, idmy ), clinfo) 129 IF( PRESENT(kdlev) ) THEN 130 IF( kdlev == jpka ) THEN 131 CALL iom_nf90_check(NF90_DEF_DIM( if90id, 'nav_lev', kdlev, idmy ), clinfo) 132 CALL iom_nf90_check(NF90_DEF_DIM( if90id, 'time_counter', NF90_UNLIMITED, idmy ), clinfo) 133 ELSE 134 CALL iom_nf90_check(NF90_DEF_DIM( if90id, 'nav_lev', jpk, idmy ), clinfo) 135 CALL iom_nf90_check(NF90_DEF_DIM( if90id, 'time_counter', NF90_UNLIMITED, idmy ), clinfo) 136 CALL iom_nf90_check(NF90_DEF_DIM( if90id, 'numcat', kdlev, idmy ), clinfo) 137 ENDIF 138 ELSE 139 CALL iom_nf90_check(NF90_DEF_DIM( if90id, 'nav_lev', jpk, idmy ), clinfo) 140 CALL iom_nf90_check(NF90_DEF_DIM( if90id, 'time_counter', NF90_UNLIMITED, idmy ), clinfo) 141 ENDIF 132 142 ! global attributes 133 143 CALL iom_nf90_check(NF90_PUT_ATT( if90id, NF90_GLOBAL, 'DOMAIN_number_total' , jpnij ), clinfo) … … 196 206 CHARACTER(len=*) , INTENT(in ) :: cdvar ! name of the variable 197 207 INTEGER , INTENT(in ) :: kiv ! 198 INTEGER, DIMENSION(:), INTENT( out), OPTIONAL :: kdimsz ! size of the dimensions199 INTEGER , INTENT( out), OPTIONAL :: kndims ! size of thedimensions208 INTEGER, DIMENSION(:), INTENT( out), OPTIONAL :: kdimsz ! size of each dimension 209 INTEGER , INTENT( out), OPTIONAL :: kndims ! number of dimensions 200 210 LOGICAL , INTENT( out), OPTIONAL :: lduld ! true if the last dimension is unlimited (time) 201 211 ! … … 584 594 IF( PRESENT(pv_r0d) ) THEN ; idims = 0 585 595 ELSEIF( PRESENT(pv_r1d) ) THEN 586 IF( SIZE(pv_r1d,1) == jpk) THEN ; idim3 = 3587 ELSE ; idim3 = 5596 IF(( SIZE(pv_r1d,1) == jpk ).OR.( SIZE(pv_r1d,1) == jpka )) THEN ; idim3 = 3 597 ELSE ; idim3 = 5 588 598 ENDIF 589 599 idims = 2 ; idimid(1:idims) = (/idim3,4/) 590 600 ELSEIF( PRESENT(pv_r2d) ) THEN ; idims = 3 ; idimid(1:idims) = (/1,2 ,4/) 591 601 ELSEIF( PRESENT(pv_r3d) ) THEN 592 IF( SIZE(pv_r3d,3) == jpk) THEN ; idim3 = 3593 ELSE ; idim3 = 5602 IF(( SIZE(pv_r3d,3) == jpk ).OR.( SIZE(pv_r3d,3) == jpka )) THEN ; idim3 = 3 603 ELSE ; idim3 = 5 594 604 ENDIF 595 605 idims = 4 ; idimid(1:idims) = (/1,2,idim3,4/) … … 674 684 CALL iom_nf90_check( NF90_PUT_VAR ( if90id, idmy, gphit(ix1:ix2, iy1:iy2) ), clinfo ) 675 685 CALL iom_nf90_check( NF90_INQ_VARID( if90id, 'nav_lev' , idmy ), clinfo ) 676 CALL iom_nf90_check( NF90_PUT_VAR ( if90id, idmy, gdept_1d ), clinfo ) 686 IF (iom_file(kiomid)%nlev == jpka) THEN ; CALL iom_nf90_check( NF90_PUT_VAR ( if90id, idmy, ght_abl), clinfo ) 687 ELSE ; CALL iom_nf90_check( NF90_PUT_VAR ( if90id, idmy, gdept_1d), clinfo ) 688 ENDIF 677 689 IF( NF90_INQ_VARID( if90id, 'numcat', idmy ) == nf90_noerr ) THEN 678 690 CALL iom_nf90_check( NF90_PUT_VAR ( if90id, idmy, (/ (idlv, idlv = 1,iom_file(kiomid)%nlev) /)), clinfo ) -
NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/OBS/obs_averg_h2d.F90
r10425 r12182 52 52 SUBROUTINE obs_avg_h2d_init( kpk, kpk2, kmaxifp, kmaxjfp, k2dint, plam, pphi, & 53 53 & pglam, pgphi, pglamf, pgphif, pmask, plamscl, pphiscl, lindegrees, & 54 & pweig, pobsmask,iminpoints )54 & pweig, iminpoints ) 55 55 !!----------------------------------------------------------------------- 56 56 !! … … 98 98 REAL(KIND=wp), DIMENSION(kmaxifp,kmaxjfp,kpk2), INTENT(OUT) :: & 99 99 & pweig ! Weights for averaging 100 REAL(KIND=wp), DIMENSION(kpk2), INTENT(OUT) :: &101 & pobsmask ! Vertical mask for observations102 100 INTEGER, INTENT(IN), OPTIONAL :: & 103 101 & iminpoints ! Reject point which is not surrounded -
NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/OBS/obs_oper.F90
r10068 r12182 342 342 CALL obs_int_h2d_init( 1, 1, k2dint, zlam, zphi, & 343 343 & zglam2(:,:,iobs), zgphi2(:,:,iobs), & 344 & zmask2(:,:,1,iobs), zweig2, zmsk_2 344 & zmask2(:,:,1,iobs), zweig2, zmsk_2) 345 345 346 346 ENDIF … … 924 924 & zglamf(:,:,iobs), zgphif(:,:,iobs), & 925 925 & zmask(:,:,iobs), plamscl, pphiscl, & 926 & lindegrees, zweig , zobsmask)926 & lindegrees, zweig ) 927 927 928 928 ! Average the model SST to the observation footprint -
NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/SBC/cpl_oasis3.F90
r10582 r12182 114 114 !------------------------------------------------------------------ 115 115 CALL oasis_init_comp ( ncomp_id, TRIM(cd_modname), nerror ) 116 IF 116 IF( nerror /= OASIS_Ok ) & 117 117 CALL oasis_abort (ncomp_id, 'cpl_init', 'Failure in oasis_init_comp') 118 118 … … 122 122 123 123 CALL oasis_get_localcomm ( kl_comm, nerror ) 124 IF 124 IF( nerror /= OASIS_Ok ) & 125 125 CALL oasis_abort (ncomp_id, 'cpl_init','Failure in oasis_get_localcomm' ) 126 126 ! … … 149 149 150 150 ! patch to restore wraparound rows in cpl_send, cpl_rcv, cpl_define 151 IF 151 IF( ltmp_wapatch ) THEN 152 152 nldi_save = nldi ; nlei_save = nlei 153 153 nldj_save = nldj ; nlej_save = nlej … … 217 217 ! 218 218 DO ji = 1, ksnd 219 IF 219 IF( ssnd(ji)%laction ) THEN 220 220 221 221 IF( ssnd(ji)%nct > nmaxcat ) THEN … … 228 228 DO jm = 1, kcplmodel 229 229 230 IF 230 IF( ssnd(ji)%nct .GT. 1 ) THEN 231 231 WRITE(cli2,'(i2.2)') jc 232 232 zclname = TRIM(ssnd(ji)%clname)//'_cat'//cli2 … … 234 234 zclname = ssnd(ji)%clname 235 235 ENDIF 236 IF 236 IF( kcplmodel > 1 ) THEN 237 237 WRITE(cli2,'(i2.2)') jm 238 238 zclname = 'model'//cli2//'_'//TRIM(zclname) … … 241 241 IF( agrif_fixed() /= 0 ) THEN 242 242 zclname=TRIM(Agrif_CFixed())//'_'//TRIM(zclname) 243 END 243 ENDIF 244 244 #endif 245 245 IF( ln_ctl ) WRITE(numout,*) "Define", ji, jc, jm, " "//TRIM(zclname), " for ", OASIS_Out 246 246 CALL oasis_def_var (ssnd(ji)%nid(jc,jm), zclname, id_part , (/ 2, 1 /), & 247 247 & OASIS_Out , ishape , OASIS_REAL, nerror ) 248 IF 248 IF( nerror /= OASIS_Ok ) THEN 249 249 WRITE(numout,*) 'Failed to define transient ', ji, jc, jm, " "//TRIM(zclname) 250 250 CALL oasis_abort ( ssnd(ji)%nid(jc,jm), 'cpl_define', 'Failure in oasis_def_var' ) … … 262 262 ! 263 263 DO ji = 1, krcv 264 IF 264 IF( srcv(ji)%laction ) THEN 265 265 266 266 IF( srcv(ji)%nct > nmaxcat ) THEN … … 273 273 DO jm = 1, kcplmodel 274 274 275 IF 275 IF( srcv(ji)%nct .GT. 1 ) THEN 276 276 WRITE(cli2,'(i2.2)') jc 277 277 zclname = TRIM(srcv(ji)%clname)//'_cat'//cli2 … … 279 279 zclname = srcv(ji)%clname 280 280 ENDIF 281 IF 281 IF( kcplmodel > 1 ) THEN 282 282 WRITE(cli2,'(i2.2)') jm 283 283 zclname = 'model'//cli2//'_'//TRIM(zclname) … … 286 286 IF( agrif_fixed() /= 0 ) THEN 287 287 zclname=TRIM(Agrif_CFixed())//'_'//TRIM(zclname) 288 END 288 ENDIF 289 289 #endif 290 290 IF( ln_ctl ) WRITE(numout,*) "Define", ji, jc, jm, " "//TRIM(zclname), " for ", OASIS_In 291 291 CALL oasis_def_var (srcv(ji)%nid(jc,jm), zclname, id_part , (/ 2, 1 /), & 292 292 & OASIS_In , ishape , OASIS_REAL, nerror ) 293 IF 293 IF( nerror /= OASIS_Ok ) THEN 294 294 WRITE(numout,*) 'Failed to define transient ', ji, jc, jm, " "//TRIM(zclname) 295 295 CALL oasis_abort ( srcv(ji)%nid(jc,jm), 'cpl_define', 'Failure in oasis_def_var' ) … … 310 310 IF( nerror /= OASIS_Ok ) CALL oasis_abort ( ncomp_id, 'cpl_define', 'Failure in oasis_enddef') 311 311 ! 312 IF 312 IF( ltmp_wapatch ) THEN 313 313 nldi = nldi_save ; nlei = nlei_save 314 314 nldj = nldj_save ; nlej = nlej_save … … 332 332 !!-------------------------------------------------------------------- 333 333 ! patch to restore wraparound rows in cpl_send, cpl_rcv, cpl_define 334 IF 334 IF( ltmp_wapatch ) THEN 335 335 nldi_save = nldi ; nlei_save = nlei 336 336 nldj_save = nldj ; nlej_save = nlej … … 349 349 CALL oasis_put ( ssnd(kid)%nid(jc,jm), kstep, pdata(nldi:nlei, nldj:nlej,jc), kinfo ) 350 350 351 IF 352 IF 351 IF( ln_ctl ) THEN 352 IF( kinfo == OASIS_Sent .OR. kinfo == OASIS_ToRest .OR. & 353 353 & kinfo == OASIS_SentOut .OR. kinfo == OASIS_ToRestOut ) THEN 354 354 WRITE(numout,*) '****************' … … 368 368 ENDDO 369 369 ENDDO 370 IF 370 IF( ltmp_wapatch ) THEN 371 371 nldi = nldi_save ; nlei = nlei_save 372 372 nldj = nldj_save ; nlej = nlej_save … … 393 393 !!-------------------------------------------------------------------- 394 394 ! patch to restore wraparound rows in cpl_send, cpl_rcv, cpl_define 395 IF 395 IF( ltmp_wapatch ) THEN 396 396 nldi_save = nldi ; nlei_save = nlei 397 397 nldj_save = nldj ; nlej_save = nlej … … 403 403 ! 404 404 DO jc = 1, srcv(kid)%nct 405 IF 405 IF( ltmp_wapatch ) THEN 406 406 IF( nimpp == 1 ) nldi = 1 407 407 IF( nimpp + jpi - 1 == jpiglo ) nlei = jpi … … 420 420 & kinfo == OASIS_RecvOut .OR. kinfo == OASIS_FromRestOut 421 421 422 IF 422 IF( ln_ctl ) WRITE(numout,*) "llaction, kinfo, kstep, ivarid: " , llaction, kinfo, kstep, srcv(kid)%nid(jc,jm) 423 423 424 IF 424 IF( llaction ) THEN 425 425 426 426 kinfo = OASIS_Rcv … … 432 432 ENDIF 433 433 434 IF 434 IF( ln_ctl ) THEN 435 435 WRITE(numout,*) '****************' 436 436 WRITE(numout,*) 'oasis_get: Incoming ', srcv(kid)%clname … … 450 450 ENDDO 451 451 452 IF 452 IF( ltmp_wapatch ) THEN 453 453 nldi = nldi_save ; nlei = nlei_save 454 454 nldj = nldj_save ; nlej = nlej_save … … 483 483 ! 484 484 DO ji = 1, nsnd 485 IF 485 IF(ssnd(ji)%laction ) THEN 486 486 DO jm = 1, ncplmodel 487 487 IF( ssnd(ji)%nid(1,jm) /= -1 ) THEN … … 495 495 ENDDO 496 496 DO ji = 1, nrcv 497 IF 497 IF(srcv(ji)%laction ) THEN 498 498 DO jm = 1, ncplmodel 499 499 IF( srcv(ji)%nid(1,jm) /= -1 ) THEN … … 529 529 ! 530 530 DEALLOCATE( exfld ) 531 IF 531 IF(nstop == 0) THEN 532 532 CALL oasis_terminate( nerror ) 533 533 ELSE -
NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/SBC/cyclone.F90
r10068 r12182 137 137 zhemi = SIGN( 1. , zrlat ) 138 138 zinfl = 15.* rad ! clim inflow angle in Tropical Cyclones 139 IF 139 IF( vortex == 0 ) THEN 140 140 141 141 ! Vortex Holland reconstruct wind at each lon-lat position … … 157 157 & + COS( zrlat ) * COS( zzrgphi ) * COS( zzrglam ) ) 158 158 159 IF 159 IF(zdist < zrout2) THEN ! calculation of wind only to a given max radius 160 160 ! shape of the wind profile 161 161 zztmp = ( zrmw / ( zdist + 1.e-12 ) )**zb 162 162 zztmp = zvmax * SQRT( zztmp * EXP(1. - zztmp) ) 163 163 164 IF 164 IF(zdist > zrout1) THEN ! bring to zero between r_out1 and r_out2 165 165 zztmp = zztmp * ( (zrout2-zdist)*1.e-6 ) 166 166 ENDIF 167 167 168 168 ! !!! KILL EQ WINDS 169 ! IF 169 ! IF(SIGN( 1. , zrlat ) /= zhemi) THEN 170 170 ! zztmp = 0. ! winds in other hemisphere 171 ! IF 172 ! ENDIF 173 ! IF 171 ! IF(ABS(gphit(ji,jj)) <= 5.) zztmp=0. ! kill between 5N-5S 172 ! ENDIF 173 ! IF(ABS(gphit(ji,jj)) <= 10. .and. ABS(gphit(ji,jj)) > 5.) THEN 174 174 ! zztmp = zztmp * ( 1./5. * (ABS(gphit(ji,jj)) - 5.) ) 175 175 ! !linear to zero between 10 and 5 … … 177 177 ! !!! / KILL EQ 178 178 179 IF 179 IF(ABS(gphit(ji,jj)) >= 55.) zztmp = 0. ! kill weak spurious winds at high latitude 180 180 181 181 zwnd_t = COS( zinfl ) * zztmp … … 196 196 END DO 197 197 198 ELSE IF 198 ELSE IF( vortex == 1 ) THEN 199 199 200 200 ! Vortex Willoughby reconstruct wind at each lon-lat position … … 206 206 zn = 2.1340 + 0.0077*zvmax - 0.4522*LOG(zrmw/1000.) - 0.0038*ABS( ztct(jtc,jp_lat) ) 207 207 zA = 0.5913 + 0.0029*zvmax - 0.1361*LOG(zrmw/1000.) - 0.0042*ABS( ztct(jtc,jp_lat) ) 208 IF 208 IF(zA < 0) THEN 209 209 zA=0 210 210 ENDIF … … 218 218 & + COS( zrlat ) * COS( zzrgphi ) * COS( zzrglam ) ) 219 219 220 IF 220 IF(zdist < zrout2) THEN ! calculation of wind only to a given max radius 221 221 222 222 ! shape of the wind profile 223 IF 223 IF(zdist <= zrmw) THEN ! inside the Radius of Maximum Wind 224 224 zztmp = zvmax * (zdist/zrmw)**zn 225 225 ELSE … … 227 227 ENDIF 228 228 229 IF 229 IF(zdist > zrout1) THEN ! bring to zero between r_out1 and r_out2 230 230 zztmp = zztmp * ( (zrout2-zdist)*1.e-6 ) 231 231 ENDIF 232 232 233 233 ! !!! KILL EQ WINDS 234 ! IF 234 ! IF(SIGN( 1. , zrlat ) /= zhemi) THEN 235 235 ! zztmp = 0. ! winds in other hemisphere 236 ! IF 237 ! ENDIF 238 ! IF 236 ! IF(ABS(gphit(ji,jj)) <= 5.) zztmp=0. ! kill between 5N-5S 237 ! ENDIF 238 ! IF(ABS(gphit(ji,jj)) <= 10. .and. ABS(gphit(ji,jj)) > 5.) THEN 239 239 ! zztmp = zztmp * ( 1./5. * (ABS(gphit(ji,jj)) - 5.) ) 240 240 ! !linear to zero between 10 and 5 … … 242 242 ! !!! / KILL EQ 243 243 244 IF 244 IF(ABS(gphit(ji,jj)) >= 55.) zztmp = 0. ! kill weak spurious winds at high latitude 245 245 246 246 zwnd_t = COS( zinfl ) * zztmp -
NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/SBC/fldread.F90
r11949 r12182 168 168 IF( PRESENT(kit) ) ll_firstcall = ll_firstcall .and. kit == 1 169 169 170 IF 170 IF( nn_components == jp_iam_sas ) THEN ; it_offset = nn_fsbc 171 171 ELSE ; it_offset = 0 172 172 ENDIF … … 391 391 ENDIF 392 392 ! 393 IF 393 IF( sdjf%cltype(1:4) == 'week' ) THEN 394 394 isec_week = isec_week + ksec_week( sdjf%cltype(6:8) ) ! second since the beginning of the week 395 395 llprevmth = isec_week > nsec_month ! longer time since the beginning of the week than the month … … 466 466 ENDIF 467 467 ! 468 IF 468 IF( nn_components == jp_iam_sas ) THEN ; it_offset = nn_fsbc 469 469 ELSE ; it_offset = 0 470 470 ENDIF … … 659 659 ENDIF 660 660 CASE DEFAULT 661 IF 661 IF(lk_c1d .AND. lmoor ) THEN 662 662 IF( sdjf%ln_tint ) THEN 663 663 CALL iom_get( sdjf%num, jpdom_unknown, sdjf%clvar, sdjf%fdta(2,2,:,2), sdjf%nrec_a(1) ) … … 1074 1074 imonth = kmonth 1075 1075 iday = kday 1076 IF 1076 IF( sdjf%cltype(1:4) == 'week' ) THEN ! find the day of the beginning of the week 1077 1077 isec_week = ksec_week( sdjf%cltype(6:8) )- (86400 * 8 ) 1078 1078 llprevmth = isec_week > nsec_month ! longer time since beginning of the week than the month … … 1083 1083 ENDIF 1084 1084 ELSE ! use current day values 1085 IF 1085 IF( sdjf%cltype(1:4) == 'week' ) THEN ! find the day of the beginning of the week 1086 1086 isec_week = ksec_week( sdjf%cltype(6:8) ) ! second since the beginning of the week 1087 1087 llprevmth = isec_week > nsec_month ! longer time since beginning of the week than the month … … 1321 1321 1322 1322 !! get dimensions 1323 IF ( SIZE(sd%fnow, 3) > 1 ) THEN 1323 !!GS: we consider 2D data as 3D data with vertical dim size = 1 1324 !IF( SIZE(sd%fnow, 3) > 1 ) THEN 1325 IF( SIZE(sd%fnow, 3) > 0 ) THEN 1324 1326 ALLOCATE( ddims(4) ) 1325 1327 ELSE … … 1334 1336 1335 1337 CALL iom_open ( sd%wgtname, inum ) ! interpolation weights 1336 IF 1338 IF( inum > 0 ) THEN 1337 1339 1338 1340 !! determine whether we have an east-west cyclic grid … … 1643 1645 1644 1646 ref_wgts(kw)%fly_dta(:,:,:) = 0.0 1645 SELECT CASE( SIZE(ref_wgts(kw)%fly_dta(jpi1:jpi2,jpj1:jpj2,:),3) ) 1646 CASE(1) 1647 CALL iom_get( num, jpdom_unknown, clvar, ref_wgts(kw)%fly_dta(jpi1:jpi2,jpj1:jpj2,1), nrec, rec1, recn) 1648 CASE DEFAULT 1647 !!GS: we consider 2D data as 3D data with vertical dim size = 1 1648 !SELECT CASE( SIZE(ref_wgts(kw)%fly_dta(jpi1:jpi2,jpj1:jpj2,:),3) ) 1649 !CASE(1) 1650 ! CALL iom_get( num, jpdom_unknown, clvar, ref_wgts(kw)%fly_dta(jpi1:jpi2,jpj1:jpj2,1), nrec, rec1, recn) 1651 !CASE DEFAULT 1649 1652 CALL iom_get( num, jpdom_unknown, clvar, ref_wgts(kw)%fly_dta(jpi1:jpi2,jpj1:jpj2,:), nrec, rec1, recn) 1650 END SELECT1653 !END SELECT 1651 1654 ENDIF 1652 1655 … … 1666 1669 END DO 1667 1670 1668 IF 1671 IF(ref_wgts(kw)%numwgt .EQ. 16) THEN 1669 1672 1670 1673 !! fix up halo points that we couldnt read from file … … 1692 1695 IF( jpi1 == 2 ) THEN 1693 1696 rec1(1) = ref_wgts(kw)%ddims(1) - ref_wgts(kw)%overlap 1694 SELECT CASE( SIZE( ref_wgts(kw)%col(:,jpj1:jpj2,:),3) ) 1695 CASE(1) 1696 CALL iom_get( num, jpdom_unknown, clvar, ref_wgts(kw)%col(:,jpj1:jpj2,1), nrec, rec1, recn) 1697 CASE DEFAULT 1697 !!GS: we consider 2D data as 3D data with vertical dim size = 1 1698 !SELECT CASE( SIZE( ref_wgts(kw)%col(:,jpj1:jpj2,:),3) ) 1699 !CASE(1) 1700 ! CALL iom_get( num, jpdom_unknown, clvar, ref_wgts(kw)%col(:,jpj1:jpj2,1), nrec, rec1, recn) 1701 !CASE DEFAULT 1698 1702 CALL iom_get( num, jpdom_unknown, clvar, ref_wgts(kw)%col(:,jpj1:jpj2,:), nrec, rec1, recn) 1699 END SELECT1703 !END SELECT 1700 1704 ref_wgts(kw)%fly_dta(jpi1-1,jpj1:jpj2,:) = ref_wgts(kw)%col(1,jpj1:jpj2,:) 1701 1705 ENDIF 1702 1706 IF( jpi2 + jpimin - 1 == ref_wgts(kw)%ddims(1)+1 ) THEN 1703 1707 rec1(1) = 1 + ref_wgts(kw)%overlap 1704 SELECT CASE( SIZE( ref_wgts(kw)%col(:,jpj1:jpj2,:),3) ) 1705 CASE(1) 1706 CALL iom_get( num, jpdom_unknown, clvar, ref_wgts(kw)%col(:,jpj1:jpj2,1), nrec, rec1, recn) 1707 CASE DEFAULT 1708 !!GS: we consider 2D data as 3D data with vertical dim size = 1 1709 !SELECT CASE( SIZE( ref_wgts(kw)%col(:,jpj1:jpj2,:),3) ) 1710 !CASE(1) 1711 ! CALL iom_get( num, jpdom_unknown, clvar, ref_wgts(kw)%col(:,jpj1:jpj2,1), nrec, rec1, recn) 1712 !CASE DEFAULT 1708 1713 CALL iom_get( num, jpdom_unknown, clvar, ref_wgts(kw)%col(:,jpj1:jpj2,:), nrec, rec1, recn) 1709 END SELECT1714 !END SELECT 1710 1715 ref_wgts(kw)%fly_dta(jpi2+1,jpj1:jpj2,:) = ref_wgts(kw)%col(1,jpj1:jpj2,:) 1711 1716 ENDIF … … 1749 1754 END DO 1750 1755 ! 1751 END 1756 ENDIF 1752 1757 ! 1753 1758 END SUBROUTINE fld_interp -
NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/SBC/sbc_oce.F90
r12150 r12182 11 11 !! 4.0 ! 2012-05 (C. Rousset) add attenuation coef for use in ice model 12 12 !! 4.0 ! 2016-06 (L. Brodeau) new unified bulk routine (based on AeroBulk) 13 !! 4.0 ! 2019-03 (F. Lemarié, G. Samson) add compatibility with ABL mode 13 14 !!---------------------------------------------------------------------- 14 15 … … 34 35 LOGICAL , PUBLIC :: ln_flx !: flux formulation 35 36 LOGICAL , PUBLIC :: ln_blk !: bulk formulation 37 LOGICAL , PUBLIC :: ln_abl !: Atmospheric boundary layer model 36 38 #if defined key_oasis3 37 39 LOGICAL , PUBLIC :: lk_oasis = .TRUE. !: OASIS used … … 76 78 INTEGER , PUBLIC, PARAMETER :: jp_flx = 2 !: flux formulation 77 79 INTEGER , PUBLIC, PARAMETER :: jp_blk = 3 !: bulk formulation 78 INTEGER , PUBLIC, PARAMETER :: jp_purecpl = 4 !: Pure ocean-atmosphere Coupled formulation 79 INTEGER , PUBLIC, PARAMETER :: jp_none = 5 !: for OPA when doing coupling via SAS module 80 INTEGER , PUBLIC, PARAMETER :: jp_abl = 4 !: Atmospheric boundary layer formulation 81 INTEGER , PUBLIC, PARAMETER :: jp_purecpl = 5 !: Pure ocean-atmosphere Coupled formulation 82 INTEGER , PUBLIC, PARAMETER :: jp_none = 6 !: for OPA when doing coupling via SAS module 80 83 81 84 !!---------------------------------------------------------------------- … … 106 109 INTEGER , PUBLIC :: ncpl_qsr_freq !: qsr coupling frequency per days from atmosphere 107 110 ! 108 LOGICAL , PUBLIC :: lhftau = .FALSE. !: HF tau used in TKE: mean(stress module) - module(mean stress)109 111 !! !! now ! before !! 110 112 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: utau , utau_b !: sea surface i-stress (ocean referential) [N/m2] 111 113 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: vtau , vtau_b !: sea surface j-stress (ocean referential) [N/m2] 112 114 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: taum !: module of sea surface stress (at T-point) [N/m2] 113 !! wndm is used onmpute surface gases exchanges in ice-free ocean or leads115 !! wndm is used compute surface gases exchanges in ice-free ocean or leads 114 116 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: wndm !: wind speed module at T-point (=|U10m-Uoce|) [m/s] 117 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: rhoa !: air density at "rn_zu" m above the sea [kg/m3] !LB 115 118 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: qsr !: sea heat flux: solar [W/m2] 116 119 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: qns , qns_b !: sea heat flux: non solar [W/m2] … … 134 137 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: xcplmask !: coupling mask for ln_mixcpl (warning: allocated in sbccpl) 135 138 139 !!--------------------------------------------------------------------- 140 !! ABL Vertical Domain size 141 !!--------------------------------------------------------------------- 142 INTEGER , PUBLIC :: jpka = 2 !: ABL number of vertical levels (default definition) 143 INTEGER , PUBLIC :: jpkam1 = 1 !: jpka-1 144 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ght_abl, ghw_abl !: ABL geopotential height (needed for iom) 145 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: e3t_abl, e3w_abl !: ABL vertical scale factors (needed for iom) 146 136 147 !!---------------------------------------------------------------------- 137 148 !! Sea Surface Mean fields … … 164 175 ! 165 176 ALLOCATE( utau(jpi,jpj) , utau_b(jpi,jpj) , taum(jpi,jpj) , & 166 & vtau(jpi,jpj) , vtau_b(jpi,jpj) , wndm(jpi,jpj) , STAT=ierr(1) )177 & vtau(jpi,jpj) , vtau_b(jpi,jpj) , wndm(jpi,jpj) , rhoa(jpi,jpj) , STAT=ierr(1) ) 167 178 ! 168 179 ALLOCATE( qns_tot(jpi,jpj) , qns (jpi,jpj) , qns_b(jpi,jpj), & … … 179 190 & ssu_m (jpi,jpj) , sst_m(jpi,jpj) , frq_m(jpi,jpj) , & 180 191 & ssv_m (jpi,jpj) , sss_m(jpi,jpj) , ssh_m(jpi,jpj) , STAT=ierr(4) ) 181 192 ! 182 193 ALLOCATE( e3t_m(jpi,jpj) , STAT=ierr(5) ) 183 194 ! 184 195 sbc_oce_alloc = MAXVAL( ierr ) 185 196 CALL mpp_sum ( 'sbc_oce', sbc_oce_alloc ) -
NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/SBC/sbcapr.F90
r11960 r12182 101 101 ! 102 102 ! !* control check 103 IF 103 IF( ln_apr_obc ) THEN 104 104 IF(lwp) WRITE(numout,*) ' Inverse barometer added to OBC ssh data' 105 105 ENDIF -
NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/SBC/sbcblk.F90
r11960 r12182 15 15 !! 3.7 ! 2014-06 (L. Brodeau) simplification and optimization of CORE bulk 16 16 !! 4.0 ! 2016-06 (L. Brodeau) sbcblk_core becomes sbcblk and is not restricted to the CORE algorithm anymore 17 !! ! ==> based on AeroBulk (http ://aerobulk.sourceforge.net/)17 !! ! ==> based on AeroBulk (https://github.com/brodeau/aerobulk/) 18 18 !! 4.0 ! 2016-10 (G. Madec) introduce a sbc_blk_init routine 19 !! 4.0 ! 2016-10 (M. Vancoppenolle) Introduce conduction flux emulator (M. Vancoppenolle) 19 !! 4.0 ! 2016-10 (M. Vancoppenolle) Introduce conduction flux emulator (M. Vancoppenolle) 20 !! 4.0 ! 2019-03 (F. Lemarié & G. Samson) add ABL compatibility (ln_abl=TRUE) 20 21 !!---------------------------------------------------------------------- 21 22 … … 23 24 !! sbc_blk_init : initialisation of the chosen bulk formulation as ocean surface boundary condition 24 25 !! sbc_blk : bulk formulation as ocean surface boundary condition 25 !! blk_oce : computes momentum, heat and freshwater fluxes over ocean 26 !! rho_air : density of (moist) air (depends on T_air, q_air and SLP 27 !! cp_air : specific heat of (moist) air (depends spec. hum. q_air) 28 !! q_sat : saturation humidity as a function of SLP and temperature 29 !! L_vap : latent heat of vaporization of water as a function of temperature 30 !! sea-ice case only : 31 !! blk_ice_tau : provide the air-ice stress 32 !! blk_ice_flx : provide the heat and mass fluxes at air-ice interface 26 !! blk_oce_1 : computes pieces of momentum, heat and freshwater fluxes over ocean for ABL model (ln_abl=TRUE) 27 !! blk_oce_2 : finalizes momentum, heat and freshwater fluxes computation over ocean after the ABL step (ln_abl=TRUE) 28 !! sea-ice case only : 29 !! blk_ice_1 : provide the air-ice stress 30 !! blk_ice_2 : provide the heat and mass fluxes at air-ice interface 33 31 !! blk_ice_qcn : provide ice surface temperature and snow/ice conduction flux (emulating conduction flux) 34 32 !! Cdn10_Lupkes2012 : Lupkes et al. (2012) air-ice drag 35 !! Cdn10_Lupkes2015 : Lupkes et al. (2015) air-ice drag 33 !! Cdn10_Lupkes2015 : Lupkes et al. (2015) air-ice drag 36 34 !!---------------------------------------------------------------------- 37 35 USE oce ! ocean dynamics and tracers … … 46 44 USE lib_fortran ! to use key_nosignedzero 47 45 #if defined key_si3 48 USE ice , ONLY : u_ice, v_ice, jpl, a_i_b, at_i_b, t_su, rn_cnd_s, hfx_err_dif46 USE ice , ONLY : jpl, a_i_b, at_i_b, rn_cnd_s, hfx_err_dif 49 47 USE icethd_dh ! for CALL ice_thd_snwblow 50 48 #endif 51 USE sbcblk_algo_ncar ! => turb_ncar : NCAR - CORE (Large & Yeager, 2009) 52 USE sbcblk_algo_coare ! => turb_coare : COAREv3.0 (Fairall et al. 2003)53 USE sbcblk_algo_coare3p 5 ! => turb_coare3p5 : COAREv3.5 (Edson et al. 2013)54 USE sbcblk_algo_ecmwf ! => turb_ecmwf : ECMWF (IFS cycle 31)49 USE sbcblk_algo_ncar ! => turb_ncar : NCAR - CORE (Large & Yeager, 2009) 50 USE sbcblk_algo_coare3p0 ! => turb_coare3p0 : COAREv3.0 (Fairall et al. 2003) 51 USE sbcblk_algo_coare3p6 ! => turb_coare3p6 : COAREv3.6 (Fairall et al. 2018 + Edson et al. 2013) 52 USE sbcblk_algo_ecmwf ! => turb_ecmwf : ECMWF (IFS cycle 45r1) 55 53 ! 56 54 USE iom ! I/O manager library … … 60 58 USE prtctl ! Print control 61 59 60 USE sbcblk_phy ! a catalog of functions for physical/meteorological parameters in the marine boundary layer, rho_air, q_sat, etc... 61 62 62 63 IMPLICIT NONE 63 64 PRIVATE … … 65 66 PUBLIC sbc_blk_init ! called in sbcmod 66 67 PUBLIC sbc_blk ! called in sbcmod 68 PUBLIC blk_oce_1 ! called in sbcabl 69 PUBLIC blk_oce_2 ! called in sbcabl 67 70 #if defined key_si3 68 PUBLIC blk_ice_ tau! routine called in icesbc69 PUBLIC blk_ice_ flx! routine called in icesbc71 PUBLIC blk_ice_1 ! routine called in icesbc 72 PUBLIC blk_ice_2 ! routine called in icesbc 70 73 PUBLIC blk_ice_qcn ! routine called in icesbc 71 #endif 72 73 !!Lolo: should ultimately be moved in the module with all physical constants ? 74 !!gm : In principle, yes. 75 REAL(wp), PARAMETER :: Cp_dry = 1005.0 !: Specic heat of dry air, constant pressure [J/K/kg] 76 REAL(wp), PARAMETER :: Cp_vap = 1860.0 !: Specic heat of water vapor, constant pressure [J/K/kg] 77 REAL(wp), PARAMETER :: R_dry = 287.05_wp !: Specific gas constant for dry air [J/K/kg] 78 REAL(wp), PARAMETER :: R_vap = 461.495_wp !: Specific gas constant for water vapor [J/K/kg] 79 REAL(wp), PARAMETER :: reps0 = R_dry/R_vap !: ratio of gas constant for dry air and water vapor => ~ 0.622 80 REAL(wp), PARAMETER :: rctv0 = R_vap/R_dry !: for virtual temperature (== (1-eps)/eps) => ~ 0.608 81 82 INTEGER , PARAMETER :: jpfld =10 ! maximum number of files to read 83 INTEGER , PARAMETER :: jp_wndi = 1 ! index of 10m wind velocity (i-component) (m/s) at T-point 84 INTEGER , PARAMETER :: jp_wndj = 2 ! index of 10m wind velocity (j-component) (m/s) at T-point 85 INTEGER , PARAMETER :: jp_tair = 3 ! index of 10m air temperature (Kelvin) 86 INTEGER , PARAMETER :: jp_humi = 4 ! index of specific humidity ( % ) 87 INTEGER , PARAMETER :: jp_qsr = 5 ! index of solar heat (W/m2) 88 INTEGER , PARAMETER :: jp_qlw = 6 ! index of Long wave (W/m2) 89 INTEGER , PARAMETER :: jp_prec = 7 ! index of total precipitation (rain+snow) (Kg/m2/s) 90 INTEGER , PARAMETER :: jp_snow = 8 ! index of snow (solid prcipitation) (kg/m2/s) 91 INTEGER , PARAMETER :: jp_slp = 9 ! index of sea level pressure (Pa) 92 INTEGER , PARAMETER :: jp_tdif =10 ! index of tau diff associated to HF tau (N/m2) at T-point 93 94 TYPE(FLD), ALLOCATABLE, DIMENSION(:) :: sf ! structure of input fields (file informations, fields read) 95 96 ! !!! Bulk parameters 97 REAL(wp), PARAMETER :: cpa = 1000.5 ! specific heat of air (only used for ice fluxes now...) 98 REAL(wp), PARAMETER :: Ls = 2.839e6 ! latent heat of sublimation 99 REAL(wp), PARAMETER :: Stef = 5.67e-8 ! Stefan Boltzmann constant 100 REAL(wp), PARAMETER :: Cd_ice = 1.4e-3 ! transfer coefficient over ice 101 REAL(wp), PARAMETER :: albo = 0.066 ! ocean albedo assumed to be constant 102 ! 74 #endif 75 76 INTEGER , PUBLIC :: jpfld ! maximum number of files to read 77 INTEGER , PUBLIC, PARAMETER :: jp_wndi = 1 ! index of 10m wind velocity (i-component) (m/s) at T-point 78 INTEGER , PUBLIC, PARAMETER :: jp_wndj = 2 ! index of 10m wind velocity (j-component) (m/s) at T-point 79 INTEGER , PUBLIC, PARAMETER :: jp_tair = 3 ! index of 10m air temperature (Kelvin) 80 INTEGER , PUBLIC, PARAMETER :: jp_humi = 4 ! index of specific humidity ( % ) 81 INTEGER , PUBLIC, PARAMETER :: jp_qsr = 5 ! index of solar heat (W/m2) 82 INTEGER , PUBLIC, PARAMETER :: jp_qlw = 6 ! index of Long wave (W/m2) 83 INTEGER , PUBLIC, PARAMETER :: jp_prec = 7 ! index of total precipitation (rain+snow) (Kg/m2/s) 84 INTEGER , PUBLIC, PARAMETER :: jp_snow = 8 ! index of snow (solid prcipitation) (kg/m2/s) 85 INTEGER , PUBLIC, PARAMETER :: jp_slp = 9 ! index of sea level pressure (Pa) 86 INTEGER , PUBLIC, PARAMETER :: jp_hpgi =10 ! index of ABL geostrophic wind or hpg (i-component) (m/s) at T-point 87 INTEGER , PUBLIC, PARAMETER :: jp_hpgj =11 ! index of ABL geostrophic wind or hpg (j-component) (m/s) at T-point 88 89 TYPE(FLD), PUBLIC, ALLOCATABLE, DIMENSION(:) :: sf ! structure of input atmospheric fields (file informations, fields read) 90 103 91 ! !!* Namelist namsbc_blk : bulk parameters 104 92 LOGICAL :: ln_NCAR ! "NCAR" algorithm (Large and Yeager 2008) 105 93 LOGICAL :: ln_COARE_3p0 ! "COARE 3.0" algorithm (Fairall et al. 2003) 106 LOGICAL :: ln_COARE_3p 5 ! "COARE 3.5" algorithm (Edson et al. 2013)107 LOGICAL :: ln_ECMWF ! "ECMWF" algorithm (IFS cycle 31)94 LOGICAL :: ln_COARE_3p6 ! "COARE 3.6" algorithm (Edson et al. 2013) 95 LOGICAL :: ln_ECMWF ! "ECMWF" algorithm (IFS cycle 45r1) 108 96 ! 109 LOGICAL :: ln_taudif ! logical flag to use the "mean of stress module - module of mean stress" data 110 REAL(wp) :: rn_pfac ! multiplication factor for precipitation 111 REAL(wp) :: rn_efac ! multiplication factor for evaporation 112 REAL(wp) :: rn_vfac ! multiplication factor for ice/ocean velocity in the calculation of wind stress 113 REAL(wp) :: rn_zqt ! z(q,t) : height of humidity and temperature measurements 114 REAL(wp) :: rn_zu ! z(u) : height of wind measurements 115 !!gm ref namelist initialize it so remove the setting to false below 116 LOGICAL :: ln_Cd_L12 = .FALSE. ! Modify the drag ice-atm depending on ice concentration (from Lupkes et al. JGR2012) 117 LOGICAL :: ln_Cd_L15 = .FALSE. ! Modify the drag ice-atm depending on ice concentration (from Lupkes et al. JGR2015) 97 LOGICAL :: ln_Cd_L12 ! ice-atm drag = F( ice concentration ) (Lupkes et al. JGR2012) 98 LOGICAL :: ln_Cd_L15 ! ice-atm drag = F( ice concentration, atmospheric stability ) (Lupkes et al. JGR2015) 118 99 ! 119 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: Cd_atm ! transfer coefficient for momentum (tau) 120 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: Ch_atm ! transfer coefficient for sensible heat (Q_sens) 121 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: Ce_atm ! tansfert coefficient for evaporation (Q_lat) 122 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: t_zu ! air temperature at wind speed height (needed by Lupkes 2015 bulk scheme) 123 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: q_zu ! air spec. hum. at wind speed height (needed by Lupkes 2015 bulk scheme) 124 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: cdn_oce, chn_oce, cen_oce ! needed by Lupkes 2015 bulk scheme 100 REAL(wp) :: rn_pfac ! multiplication factor for precipitation 101 REAL(wp), PUBLIC :: rn_efac ! multiplication factor for evaporation 102 REAL(wp), PUBLIC :: rn_vfac ! multiplication factor for ice/ocean velocity in the calculation of wind stress 103 REAL(wp) :: rn_zqt ! z(q,t) : height of humidity and temperature measurements 104 REAL(wp) :: rn_zu ! z(u) : height of wind measurements 105 ! 106 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: Cd_ice , Ch_ice , Ce_ice ! transfert coefficients over ice 107 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: Cdn_oce, Chn_oce, Cen_oce ! neutral coeffs over ocean (L15 bulk scheme) 108 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: t_zu, q_zu ! air temp. and spec. hum. at wind speed height (L15 bulk scheme) 109 110 LOGICAL :: ln_skin_cs ! use the cool-skin (only available in ECMWF and COARE algorithms) !LB 111 LOGICAL :: ln_skin_wl ! use the warm-layer parameterization (only available in ECMWF and COARE algorithms) !LB 112 LOGICAL :: ln_humi_sph ! humidity read in files ("sn_humi") is specific humidity [kg/kg] if .true. !LB 113 LOGICAL :: ln_humi_dpt ! humidity read in files ("sn_humi") is dew-point temperature [K] if .true. !LB 114 LOGICAL :: ln_humi_rlh ! humidity read in files ("sn_humi") is relative humidity [%] if .true. !LB 115 ! 116 INTEGER :: nhumi ! choice of the bulk algorithm 117 ! ! associated indices: 118 INTEGER, PARAMETER :: np_humi_sph = 1 119 INTEGER, PARAMETER :: np_humi_dpt = 2 120 INTEGER, PARAMETER :: np_humi_rlh = 3 125 121 126 122 INTEGER :: nblk ! choice of the bulk algorithm … … 128 124 INTEGER, PARAMETER :: np_NCAR = 1 ! "NCAR" algorithm (Large and Yeager 2008) 129 125 INTEGER, PARAMETER :: np_COARE_3p0 = 2 ! "COARE 3.0" algorithm (Fairall et al. 2003) 130 INTEGER, PARAMETER :: np_COARE_3p 5 = 3 ! "COARE 3.5" algorithm (Edson et al. 2013)131 INTEGER, PARAMETER :: np_ECMWF = 4 ! "ECMWF" algorithm (IFS cycle 31)126 INTEGER, PARAMETER :: np_COARE_3p6 = 3 ! "COARE 3.6" algorithm (Edson et al. 2013) 127 INTEGER, PARAMETER :: np_ECMWF = 4 ! "ECMWF" algorithm (IFS cycle 45r1) 132 128 133 129 !! * Substitutions … … 144 140 !! *** ROUTINE sbc_blk_alloc *** 145 141 !!------------------------------------------------------------------- 146 ALLOCATE( Cd_atm (jpi,jpj), Ch_atm (jpi,jpj), Ce_atm (jpi,jpj), t_zu(jpi,jpj), q_zu(jpi,jpj), & 147 & cdn_oce(jpi,jpj), chn_oce(jpi,jpj), cen_oce(jpi,jpj), STAT=sbc_blk_alloc ) 142 ALLOCATE( t_zu(jpi,jpj) , q_zu(jpi,jpj) , & 143 & Cdn_oce(jpi,jpj), Chn_oce(jpi,jpj), Cen_oce(jpi,jpj), & 144 & Cd_ice (jpi,jpj), Ch_ice (jpi,jpj), Ce_ice (jpi,jpj), STAT=sbc_blk_alloc ) 148 145 ! 149 146 CALL mpp_sum ( 'sbcblk', sbc_blk_alloc ) … … 158 155 !! ** Purpose : choose and initialize a bulk formulae formulation 159 156 !! 160 !! ** Method : 157 !! ** Method : 161 158 !! 162 159 !!---------------------------------------------------------------------- 163 INTEGER :: ifpr, jfld! dummy loop indice and argument160 INTEGER :: jfpr ! dummy loop indice and argument 164 161 INTEGER :: ios, ierror, ioptio ! Local integer 165 162 !! 166 163 CHARACTER(len=100) :: cn_dir ! Root directory for location of atmospheric forcing files 167 TYPE(FLD_N), DIMENSION(jpfld) :: slf_i! array of namelist informations on the fields to read164 TYPE(FLD_N), ALLOCATABLE, DIMENSION(:) :: slf_i ! array of namelist informations on the fields to read 168 165 TYPE(FLD_N) :: sn_wndi, sn_wndj, sn_humi, sn_qsr ! informations about the fields to be read 169 166 TYPE(FLD_N) :: sn_qlw , sn_tair, sn_prec, sn_snow ! " " 170 TYPE(FLD_N) :: sn_slp , sn_ tdif! " "167 TYPE(FLD_N) :: sn_slp , sn_hpgi, sn_hpgj ! " " 171 168 NAMELIST/namsbc_blk/ sn_wndi, sn_wndj, sn_humi, sn_qsr, sn_qlw , & ! input fields 172 & sn_tair, sn_prec, sn_snow, sn_slp, sn_tdif, & 173 & ln_NCAR, ln_COARE_3p0, ln_COARE_3p5, ln_ECMWF, & ! bulk algorithm 174 & cn_dir , ln_taudif, rn_zqt, rn_zu, & 175 & rn_pfac, rn_efac, rn_vfac, ln_Cd_L12, ln_Cd_L15 169 & sn_tair, sn_prec, sn_snow, sn_slp, sn_hpgi, sn_hpgj, & 170 & ln_NCAR, ln_COARE_3p0, ln_COARE_3p6, ln_ECMWF, & ! bulk algorithm 171 & cn_dir , rn_zqt, rn_zu, & 172 & rn_pfac, rn_efac, rn_vfac, ln_Cd_L12, ln_Cd_L15, & 173 & ln_skin_cs, ln_skin_wl, ln_humi_sph, ln_humi_dpt, ln_humi_rlh ! cool-skin / warm-layer !LB 176 174 !!--------------------------------------------------------------------- 177 175 ! … … 179 177 IF( sbc_blk_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'sbc_blk : unable to allocate standard arrays' ) 180 178 ! 181 ! !** read bulk namelist 179 ! !** read bulk namelist 182 180 READ ( numnam_ref, namsbc_blk, IOSTAT = ios, ERR = 901) 183 181 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_blk in reference namelist' ) … … 190 188 ! !** initialization of the chosen bulk formulae (+ check) 191 189 ! !* select the bulk chosen in the namelist and check the choice 192 ioptio = 0 193 IF( ln_NCAR ) THEN ; nblk = np_NCAR ; ioptio = ioptio + 1 ; ENDIF 194 IF( ln_COARE_3p0 ) THEN ; nblk = np_COARE_3p0 ; ioptio = ioptio + 1 ; ENDIF 195 IF( ln_COARE_3p5 ) THEN ; nblk = np_COARE_3p5 ; ioptio = ioptio + 1 ; ENDIF 196 IF( ln_ECMWF ) THEN ; nblk = np_ECMWF ; ioptio = ioptio + 1 ; ENDIF 197 ! 190 ioptio = 0 191 IF( ln_NCAR ) THEN 192 nblk = np_NCAR ; ioptio = ioptio + 1 193 ENDIF 194 IF( ln_COARE_3p0 ) THEN 195 nblk = np_COARE_3p0 ; ioptio = ioptio + 1 196 ENDIF 197 IF( ln_COARE_3p6 ) THEN 198 nblk = np_COARE_3p6 ; ioptio = ioptio + 1 199 ENDIF 200 IF( ln_ECMWF ) THEN 201 nblk = np_ECMWF ; ioptio = ioptio + 1 202 ENDIF 198 203 IF( ioptio /= 1 ) CALL ctl_stop( 'sbc_blk_init: Choose one and only one bulk algorithm' ) 204 205 ! !** initialization of the cool-skin / warm-layer parametrization 206 IF( ln_skin_cs .OR. ln_skin_wl ) THEN 207 !! Some namelist sanity tests: 208 IF( ln_NCAR ) & 209 & CALL ctl_stop( 'sbc_blk_init: Cool-skin/warm-layer param. not compatible with NCAR algorithm' ) 210 IF( nn_fsbc /= 1 ) & 211 & CALL ctl_stop( 'sbc_blk_init: Please set "nn_fsbc" to 1 when using cool-skin/warm-layer param.') 212 END IF 213 214 IF( ln_skin_wl ) THEN 215 !! Check if the frequency of downwelling solar flux input makes sense and if ln_dm2dc=T if it is daily! 216 IF( (sn_qsr%freqh < 0.).OR.(sn_qsr%freqh > 24.) ) & 217 & CALL ctl_stop( 'sbc_blk_init: Warm-layer param. (ln_skin_wl) not compatible with freq. of solar flux > daily' ) 218 IF( (sn_qsr%freqh == 24.).AND.(.NOT. ln_dm2dc) ) & 219 & CALL ctl_stop( 'sbc_blk_init: Please set ln_dm2dc=T for warm-layer param. (ln_skin_wl) to work properly' ) 220 END IF 221 222 ioptio = 0 223 IF( ln_humi_sph ) THEN 224 nhumi = np_humi_sph ; ioptio = ioptio + 1 225 ENDIF 226 IF( ln_humi_dpt ) THEN 227 nhumi = np_humi_dpt ; ioptio = ioptio + 1 228 ENDIF 229 IF( ln_humi_rlh ) THEN 230 nhumi = np_humi_rlh ; ioptio = ioptio + 1 231 ENDIF 232 IF( ioptio /= 1 ) CALL ctl_stop( 'sbc_blk_init: Choose one and only one type of air humidity' ) 199 233 ! 200 234 IF( ln_dm2dc ) THEN !* check: diurnal cycle on Qsr 201 235 IF( sn_qsr%freqh /= 24. ) CALL ctl_stop( 'sbc_blk_init: ln_dm2dc=T only with daily short-wave input' ) 202 IF( sn_qsr%ln_tint ) THEN 236 IF( sn_qsr%ln_tint ) THEN 203 237 CALL ctl_warn( 'sbc_blk_init: ln_dm2dc=T daily qsr time interpolation done by sbcdcy module', & 204 238 & ' ==> We force time interpolation = .false. for qsr' ) … … 208 242 ! !* set the bulk structure 209 243 ! !- store namelist information in an array 244 IF( ln_blk ) jpfld = 9 245 IF( ln_abl ) jpfld = 11 246 ALLOCATE( slf_i(jpfld) ) 247 ! 210 248 slf_i(jp_wndi) = sn_wndi ; slf_i(jp_wndj) = sn_wndj 211 249 slf_i(jp_qsr ) = sn_qsr ; slf_i(jp_qlw ) = sn_qlw 212 250 slf_i(jp_tair) = sn_tair ; slf_i(jp_humi) = sn_humi 213 251 slf_i(jp_prec) = sn_prec ; slf_i(jp_snow) = sn_snow 214 slf_i(jp_slp ) = sn_slp ; slf_i(jp_tdif) = sn_tdif215 !216 lhftau = ln_taudif !- add an extra field if HF stress is used217 jfld = jpfld - COUNT( (/.NOT.lhftau/) )252 slf_i(jp_slp ) = sn_slp 253 IF( ln_abl ) THEN 254 slf_i(jp_hpgi) = sn_hpgi ; slf_i(jp_hpgj) = sn_hpgj 255 END IF 218 256 ! 219 257 ! !- allocate the bulk structure 220 ALLOCATE( sf(j fld), STAT=ierror )258 ALLOCATE( sf(jpfld), STAT=ierror ) 221 259 IF( ierror > 0 ) CALL ctl_stop( 'STOP', 'sbc_blk_init: unable to allocate sf structure' ) 222 DO ifpr= 1, jfld 223 ALLOCATE( sf(ifpr)%fnow(jpi,jpj,1) ) 224 IF( slf_i(ifpr)%ln_tint ) ALLOCATE( sf(ifpr)%fdta(jpi,jpj,1,2) ) 225 IF( slf_i(ifpr)%freqh > 0. .AND. MOD( NINT(3600. * slf_i(ifpr)%freqh), nn_fsbc * NINT(rdt) ) /= 0 ) & 226 & CALL ctl_warn( 'sbc_blk_init: sbcmod timestep rdt*nn_fsbc is NOT a submultiple of atmospheric forcing frequency.', & 227 & ' This is not ideal. You should consider changing either rdt or nn_fsbc value...' ) 228 260 ! 261 DO jfpr= 1, jpfld 262 ! 263 IF( TRIM(sf(jfpr)%clrootname) == 'NOT USED' ) THEN !-- not used field --! (only now allocated and set to zero) 264 ALLOCATE( sf(jfpr)%fnow(jpi,jpj,1) ) 265 sf(jfpr)%fnow(:,:,1) = 0._wp 266 ELSE !-- used field --! 267 IF( ln_abl .AND. & 268 & ( jfpr == jp_wndi .OR. jfpr == jp_wndj .OR. jfpr == jp_humi .OR. & 269 & jfpr == jp_hpgi .OR. jfpr == jp_hpgj .OR. jfpr == jp_tair ) ) THEN ! ABL: some fields are 3D input 270 ALLOCATE( sf(jfpr)%fnow(jpi,jpj,jpka) ) 271 IF( slf_i(jfpr)%ln_tint ) ALLOCATE( sf(jfpr)%fdta(jpi,jpj,jpka,2) ) 272 ELSE ! others or Bulk fields are 2D fiels 273 ALLOCATE( sf(jfpr)%fnow(jpi,jpj,1) ) 274 IF( slf_i(jfpr)%ln_tint ) ALLOCATE( sf(jfpr)%fdta(jpi,jpj,1,2) ) 275 ENDIF 276 ! 277 IF( slf_i(jfpr)%freqh > 0. .AND. MOD( NINT(3600. * slf_i(jfpr)%freqh), nn_fsbc * NINT(rdt) ) /= 0 ) & 278 & CALL ctl_warn( 'sbc_blk_init: sbcmod timestep rdt*nn_fsbc is NOT a submultiple of atmospheric forcing frequency.', & 279 & ' This is not ideal. You should consider changing either rdt or nn_fsbc value...' ) 280 ENDIF 229 281 END DO 230 282 ! !- fill the bulk structure with namelist informations 231 283 CALL fld_fill( sf, slf_i, cn_dir, 'sbc_blk_init', 'surface boundary condition -- bulk formulae', 'namsbc_blk' ) 232 284 ! 233 IF 234 !Activated wave module but neither drag nor stokes drift activated235 IF 285 IF( ln_wave ) THEN 286 !Activated wave module but neither drag nor stokes drift activated 287 IF( .NOT.(ln_cdgw .OR. ln_sdw .OR. ln_tauwoc .OR. ln_stcor ) ) THEN 236 288 CALL ctl_stop( 'STOP', 'Ask for wave coupling but ln_cdgw=F, ln_sdw=F, ln_tauwoc=F, ln_stcor=F' ) 237 !drag coefficient read from wave model definable only with mfs bulk formulae and core238 ELSEIF (ln_cdgw .AND. .NOT. ln_NCAR ) THEN239 240 ELSEIF 241 289 !drag coefficient read from wave model definable only with mfs bulk formulae and core 290 ELSEIF(ln_cdgw .AND. .NOT. ln_NCAR ) THEN 291 CALL ctl_stop( 'drag coefficient read from wave model definable only with NCAR and CORE bulk formulae') 292 ELSEIF(ln_stcor .AND. .NOT. ln_sdw) THEN 293 CALL ctl_stop( 'Stokes-Coriolis term calculated only if activated Stokes Drift ln_sdw=T') 242 294 ENDIF 243 295 ELSE 244 IF ( ln_cdgw .OR. ln_sdw .OR. ln_tauwoc .OR. ln_stcor ) & 245 & CALL ctl_stop( 'Not Activated Wave Module (ln_wave=F) but asked coupling ', & 246 & 'with drag coefficient (ln_cdgw =T) ' , & 247 & 'or Stokes Drift (ln_sdw=T) ' , & 248 & 'or ocean stress modification due to waves (ln_tauwoc=T) ', & 249 & 'or Stokes-Coriolis term (ln_stcori=T)' ) 250 ENDIF 251 ! 252 ! 296 IF( ln_cdgw .OR. ln_sdw .OR. ln_tauwoc .OR. ln_stcor ) & 297 & CALL ctl_stop( 'Not Activated Wave Module (ln_wave=F) but asked coupling ', & 298 & 'with drag coefficient (ln_cdgw =T) ' , & 299 & 'or Stokes Drift (ln_sdw=T) ' , & 300 & 'or ocean stress modification due to waves (ln_tauwoc=T) ', & 301 & 'or Stokes-Coriolis term (ln_stcori=T)' ) 302 ENDIF 303 ! 304 IF( ln_abl ) THEN ! ABL: read 3D fields for wind, temperature, humidity and pressure gradient 305 rn_zqt = ght_abl(2) ! set the bulk altitude to ABL first level 306 rn_zu = ght_abl(2) 307 IF(lwp) WRITE(numout,*) 308 IF(lwp) WRITE(numout,*) ' ABL formulation: overwrite rn_zqt & rn_zu with ABL first level altitude' 309 ENDIF 310 ! 311 ! set transfer coefficients to default sea-ice values 312 Cd_ice(:,:) = rCd_ice 313 Ch_ice(:,:) = rCd_ice 314 Ce_ice(:,:) = rCd_ice 315 ! 253 316 IF(lwp) THEN !** Control print 254 317 ! 255 WRITE(numout,*) !* namelist 318 WRITE(numout,*) !* namelist 256 319 WRITE(numout,*) ' Namelist namsbc_blk (other than data information):' 257 320 WRITE(numout,*) ' "NCAR" algorithm (Large and Yeager 2008) ln_NCAR = ', ln_NCAR 258 321 WRITE(numout,*) ' "COARE 3.0" algorithm (Fairall et al. 2003) ln_COARE_3p0 = ', ln_COARE_3p0 259 WRITE(numout,*) ' "COARE 3.5" algorithm (Edson et al. 2013) ln_COARE_3p5 = ', ln_COARE_3p0 260 WRITE(numout,*) ' "ECMWF" algorithm (IFS cycle 31) ln_ECMWF = ', ln_ECMWF 261 WRITE(numout,*) ' add High freq.contribution to the stress module ln_taudif = ', ln_taudif 322 WRITE(numout,*) ' "COARE 3.6" algorithm (Fairall 2018 + Edson al 2013)ln_COARE_3p6 = ', ln_COARE_3p6 323 WRITE(numout,*) ' "ECMWF" algorithm (IFS cycle 45r1) ln_ECMWF = ', ln_ECMWF 262 324 WRITE(numout,*) ' Air temperature and humidity reference height (m) rn_zqt = ', rn_zqt 263 325 WRITE(numout,*) ' Wind vector reference height (m) rn_zu = ', rn_zu … … 273 335 CASE( np_NCAR ) ; WRITE(numout,*) ' ==>>> "NCAR" algorithm (Large and Yeager 2008)' 274 336 CASE( np_COARE_3p0 ) ; WRITE(numout,*) ' ==>>> "COARE 3.0" algorithm (Fairall et al. 2003)' 275 CASE( np_COARE_3p 5 ) ; WRITE(numout,*) ' ==>>> "COARE 3.5" algorithm (Edson et al. 2013)'276 CASE( np_ECMWF ) ; WRITE(numout,*) ' ==>>> "ECMWF" algorithm (IFS cycle 31)'337 CASE( np_COARE_3p6 ) ; WRITE(numout,*) ' ==>>> "COARE 3.6" algorithm (Fairall 2018+Edson et al. 2013)' 338 CASE( np_ECMWF ) ; WRITE(numout,*) ' ==>>> "ECMWF" algorithm (IFS cycle 45r1)' 277 339 END SELECT 278 340 ! 341 WRITE(numout,*) 342 WRITE(numout,*) ' use cool-skin parameterization (SSST) ln_skin_cs = ', ln_skin_cs 343 WRITE(numout,*) ' use warm-layer parameterization (SSST) ln_skin_wl = ', ln_skin_wl 344 ! 345 WRITE(numout,*) 346 SELECT CASE( nhumi ) !* Print the choice of air humidity 347 CASE( np_humi_sph ) ; WRITE(numout,*) ' ==>>> air humidity is SPECIFIC HUMIDITY [kg/kg]' 348 CASE( np_humi_dpt ) ; WRITE(numout,*) ' ==>>> air humidity is DEW-POINT TEMPERATURE [K]' 349 CASE( np_humi_rlh ) ; WRITE(numout,*) ' ==>>> air humidity is RELATIVE HUMIDITY [%]' 350 END SELECT 351 ! 279 352 ENDIF 280 353 ! … … 289 362 !! (momentum, heat, freshwater and runoff) 290 363 !! 291 !! ** Method : (1) READ each fluxes in NetCDF files: 292 !! the 10m wind velocity (i-component) (m/s) at T-point 293 !! the 10m wind velocity (j-component) (m/s) at T-point 294 !! the 10m or 2m specific humidity ( % ) 295 !! the solar heat (W/m2) 296 !! the Long wave (W/m2) 297 !! the 10m or 2m air temperature (Kelvin) 298 !! the total precipitation (rain+snow) (Kg/m2/s) 299 !! the snow (solid prcipitation) (kg/m2/s) 300 !! the tau diff associated to HF tau (N/m2) at T-point (ln_taudif=T) 301 !! (2) CALL blk_oce 364 !! ** Method : 365 !! (1) READ each fluxes in NetCDF files: 366 !! the wind velocity (i-component) at z=rn_zu (m/s) at T-point 367 !! the wind velocity (j-component) at z=rn_zu (m/s) at T-point 368 !! the specific humidity at z=rn_zqt (kg/kg) 369 !! the air temperature at z=rn_zqt (Kelvin) 370 !! the solar heat (W/m2) 371 !! the Long wave (W/m2) 372 !! the total precipitation (rain+snow) (Kg/m2/s) 373 !! the snow (solid precipitation) (kg/m2/s) 374 !! ABL dynamical forcing (i/j-components of either hpg or geostrophic winds) 375 !! (2) CALL blk_oce_1 and blk_oce_2 302 376 !! 303 377 !! C A U T I O N : never mask the surface stress fields … … 316 390 !!---------------------------------------------------------------------- 317 391 INTEGER, INTENT(in) :: kt ! ocean time step 318 !!--------------------------------------------------------------------- 392 !!---------------------------------------------------------------------- 393 REAL(wp), DIMENSION(jpi,jpj) :: zssq, zcd_du, zsen, zevp 394 REAL(wp) :: ztmp 395 !!---------------------------------------------------------------------- 319 396 ! 320 397 CALL fld_read( kt, nn_fsbc, sf ) ! input fields provided at the current time-step 321 ! 398 399 ! Sanity/consistence test on humidity at first time step to detect potential screw-up: 400 IF( kt == nit000 ) THEN 401 WRITE(numout,*) '' 402 #if defined key_agrif 403 WRITE(numout,*) ' === AGRIF => Sanity/consistence test on air humidity SKIPPED! :( ===' 404 #else 405 ztmp = SUM(tmask(:,:,1)) ! number of ocean points on local proc domain 406 IF( ztmp > 8._wp ) THEN ! test only on proc domains with at least 8 ocean points! 407 ztmp = SUM(sf(jp_humi)%fnow(:,:,1)*tmask(:,:,1))/ztmp ! mean humidity over ocean on proc 408 SELECT CASE( nhumi ) 409 CASE( np_humi_sph ) ! specific humidity => expect: 0. <= something < 0.065 [kg/kg] (0.061 is saturation at 45degC !!!) 410 IF( (ztmp < 0._wp) .OR. (ztmp > 0.065) ) ztmp = -1._wp 411 CASE( np_humi_dpt ) ! dew-point temperature => expect: 110. <= something < 320. [K] 412 IF( (ztmp < 110._wp).OR.(ztmp > 320._wp) ) ztmp = -1._wp 413 CASE( np_humi_rlh ) ! relative humidity => expect: 0. <= something < 100. [%] 414 IF( (ztmp < 0._wp) .OR.(ztmp > 100._wp) ) ztmp = -1._wp 415 END SELECT 416 IF(ztmp < 0._wp) THEN 417 WRITE(numout,'(" Mean humidity value found on proc #",i5.5," is: ",f)') narea, ztmp 418 CALL ctl_stop( 'STOP', 'Something is wrong with air humidity!!!', & 419 & ' ==> check the unit in your input files' , & 420 & ' ==> check consistence of namelist choice: specific? relative? dew-point?', & 421 & ' ==> ln_humi_sph -> [kg/kg] | ln_humi_rlh -> [%] | ln_humi_dpt -> [K] !!!' ) 422 END IF 423 END IF 424 WRITE(numout,*) ' === Sanity/consistence test on air humidity sucessfuly passed! ===' 425 #endif 426 WRITE(numout,*) '' 427 END IF !IF( kt == nit000 ) 322 428 ! ! compute the surface ocean fluxes using bulk formulea 323 IF( MOD( kt - 1, nn_fsbc ) == 0 ) CALL blk_oce( kt, sf, sst_m, ssu_m, ssv_m ) 324 429 IF( MOD( kt - 1, nn_fsbc ) == 0 ) THEN 430 CALL blk_oce_1( kt, sf(jp_wndi)%fnow(:,:,1), sf(jp_wndj)%fnow(:,:,1), & ! <<= in 431 & sf(jp_tair)%fnow(:,:,1), sf(jp_humi)%fnow(:,:,1), & ! <<= in 432 & sf(jp_slp )%fnow(:,:,1), sst_m, ssu_m, ssv_m, & ! <<= in 433 & sf(jp_qsr )%fnow(:,:,1), sf(jp_qlw )%fnow(:,:,1), & ! <<= in (wl/cs) 434 & zssq, zcd_du, zsen, zevp ) ! =>> out 435 436 CALL blk_oce_2( sf(jp_tair)%fnow(:,:,1), sf(jp_qsr )%fnow(:,:,1), & ! <<= in 437 & sf(jp_qlw )%fnow(:,:,1), sf(jp_prec)%fnow(:,:,1), & ! <<= in 438 & sf(jp_snow)%fnow(:,:,1), sst_m, & ! <<= in 439 & zsen, zevp ) ! <=> in out 440 ENDIF 441 ! 325 442 #if defined key_cice 326 443 IF( MOD( kt - 1, nn_fsbc ) == 0 ) THEN 327 444 qlw_ice(:,:,1) = sf(jp_qlw )%fnow(:,:,1) 328 IF( ln_dm2dc ) THEN ; qsr_ice(:,:,1) = sbc_dcy( sf(jp_qsr)%fnow(:,:,1) ) 329 ELSE ; qsr_ice(:,:,1) = sf(jp_qsr)%fnow(:,:,1) 330 ENDIF 445 IF( ln_dm2dc ) THEN 446 qsr_ice(:,:,1) = sbc_dcy( sf(jp_qsr)%fnow(:,:,1) ) 447 ELSE 448 qsr_ice(:,:,1) = sf(jp_qsr)%fnow(:,:,1) 449 ENDIF 331 450 tatm_ice(:,:) = sf(jp_tair)%fnow(:,:,1) 332 qatm_ice(:,:) = sf(jp_humi)%fnow(:,:,1) 451 452 SELECT CASE( nhumi ) 453 CASE( np_humi_sph ) 454 qatm_ice(:,:) = sf(jp_humi)%fnow(:,:,1) 455 CASE( np_humi_dpt ) 456 qatm_ice(:,:) = q_sat( sf(jp_humi)%fnow(:,:,1), sf(jp_slp)%fnow(:,:,1) ) 457 CASE( np_humi_rlh ) 458 qatm_ice(:,:) = q_air_rh( 0.01_wp*sf(jp_humi)%fnow(:,:,1), sf(jp_tair)%fnow(:,:,1), sf(jp_slp)%fnow(:,:,1)) !LB: 0.01 => RH is % percent in file 459 END SELECT 460 333 461 tprecip(:,:) = sf(jp_prec)%fnow(:,:,1) * rn_pfac 334 462 sprecip(:,:) = sf(jp_snow)%fnow(:,:,1) * rn_pfac … … 341 469 342 470 343 SUBROUTINE blk_oce( kt, sf, pst, pu, pv ) 344 !!--------------------------------------------------------------------- 345 !! *** ROUTINE blk_oce *** 346 !! 347 !! ** Purpose : provide the momentum, heat and freshwater fluxes at 348 !! the ocean surface at each time step 349 !! 350 !! ** Method : bulk formulea for the ocean using atmospheric 351 !! fields read in sbc_read 471 SUBROUTINE blk_oce_1( kt, pwndi, pwndj , ptair, phumi, & ! inp 472 & pslp , pst , pu , pv, & ! inp 473 & pqsr , pqlw , & ! inp 474 & pssq , pcd_du, psen , pevp ) ! out 475 !!--------------------------------------------------------------------- 476 !! *** ROUTINE blk_oce_1 *** 477 !! 478 !! ** Purpose : if ln_blk=T, computes surface momentum, heat and freshwater fluxes 479 !! if ln_abl=T, computes Cd x |U|, Ch x |U|, Ce x |U| for ABL integration 480 !! 481 !! ** Method : bulk formulae using atmospheric fields from : 482 !! if ln_blk=T, atmospheric fields read in sbc_read 483 !! if ln_abl=T, the ABL model at previous time-step 484 !! 485 !! ** Outputs : - pssq : surface humidity used to compute latent heat flux (kg/kg) 486 !! - pcd_du : Cd x |dU| at T-points (m/s) 487 !! - psen : Ch x |dU| at T-points (m/s) 488 !! - pevp : Ce x |dU| at T-points (m/s) 489 !!--------------------------------------------------------------------- 490 INTEGER , INTENT(in ) :: kt ! time step index 491 REAL(wp), INTENT(in ), DIMENSION(:,:) :: pwndi ! atmospheric wind at U-point [m/s] 492 REAL(wp), INTENT(in ), DIMENSION(:,:) :: pwndj ! atmospheric wind at V-point [m/s] 493 REAL(wp), INTENT(in ), DIMENSION(:,:) :: phumi ! specific humidity at T-points [kg/kg] 494 REAL(wp), INTENT(in ), DIMENSION(:,:) :: ptair ! potential temperature at T-points [Kelvin] 495 REAL(wp), INTENT(in ), DIMENSION(:,:) :: pslp ! sea-level pressure [Pa] 496 REAL(wp), INTENT(in ), DIMENSION(:,:) :: pst ! surface temperature [Celcius] 497 REAL(wp), INTENT(in ), DIMENSION(:,:) :: pu ! surface current at U-point (i-component) [m/s] 498 REAL(wp), INTENT(in ), DIMENSION(:,:) :: pv ! surface current at V-point (j-component) [m/s] 499 REAL(wp), INTENT(in ), DIMENSION(:,:) :: pqsr ! 500 REAL(wp), INTENT(in ), DIMENSION(:,:) :: pqlw ! 501 REAL(wp), INTENT( out), DIMENSION(:,:) :: pssq ! specific humidity at pst [kg/kg] 502 REAL(wp), INTENT( out), DIMENSION(:,:) :: pcd_du ! Cd x |dU| at T-points [m/s] 503 REAL(wp), INTENT( out), DIMENSION(:,:) :: psen ! Ch x |dU| at T-points [m/s] 504 REAL(wp), INTENT( out), DIMENSION(:,:) :: pevp ! Ce x |dU| at T-points [m/s] 505 ! 506 INTEGER :: ji, jj ! dummy loop indices 507 REAL(wp) :: zztmp ! local variable 508 REAL(wp), DIMENSION(jpi,jpj) :: zwnd_i, zwnd_j ! wind speed components at T-point 509 REAL(wp), DIMENSION(jpi,jpj) :: zst ! surface temperature in Kelvin 510 REAL(wp), DIMENSION(jpi,jpj) :: zU_zu ! bulk wind speed at height zu [m/s] 511 REAL(wp), DIMENSION(jpi,jpj) :: ztpot ! potential temperature of air at z=rn_zqt [K] 512 REAL(wp), DIMENSION(jpi,jpj) :: zqair ! specific humidity of air at z=rn_zqt [kg/kg] 513 REAL(wp), DIMENSION(jpi,jpj) :: zcd_oce ! momentum transfert coefficient over ocean 514 REAL(wp), DIMENSION(jpi,jpj) :: zch_oce ! sensible heat transfert coefficient over ocean 515 REAL(wp), DIMENSION(jpi,jpj) :: zce_oce ! latent heat transfert coefficient over ocean 516 REAL(wp), DIMENSION(jpi,jpj) :: zqla ! latent heat flux 517 REAL(wp), DIMENSION(jpi,jpj) :: zztmp1, zztmp2 518 !!--------------------------------------------------------------------- 519 ! 520 ! local scalars ( place there for vector optimisation purposes) 521 zst(:,:) = pst(:,:) + rt0 ! convert SST from Celcius to Kelvin (and set minimum value far above 0 K) 522 523 ! ----------------------------------------------------------------------------- ! 524 ! 0 Wind components and module at T-point relative to the moving ocean ! 525 ! ----------------------------------------------------------------------------- ! 526 527 ! ... components ( U10m - U_oce ) at T-point (unmasked) 528 #if defined key_cyclone 529 zwnd_i(:,:) = 0._wp 530 zwnd_j(:,:) = 0._wp 531 CALL wnd_cyc( kt, zwnd_i, zwnd_j ) ! add analytical tropical cyclone (Vincent et al. JGR 2012) 532 DO jj = 2, jpjm1 533 DO ji = fs_2, fs_jpim1 ! vect. opt. 534 pwndi(ji,jj) = pwndi(ji,jj) + zwnd_i(ji,jj) 535 pwndj(ji,jj) = pwndj(ji,jj) + zwnd_j(ji,jj) 536 END DO 537 END DO 538 #endif 539 DO jj = 2, jpjm1 540 DO ji = fs_2, fs_jpim1 ! vect. opt. 541 zwnd_i(ji,jj) = ( pwndi(ji,jj) - rn_vfac * 0.5 * ( pu(ji-1,jj ) + pu(ji,jj) ) ) 542 zwnd_j(ji,jj) = ( pwndj(ji,jj) - rn_vfac * 0.5 * ( pv(ji ,jj-1) + pv(ji,jj) ) ) 543 END DO 544 END DO 545 CALL lbc_lnk_multi( 'sbcblk', zwnd_i, 'T', -1., zwnd_j, 'T', -1. ) 546 ! ... scalar wind ( = | U10m - U_oce | ) at T-point (masked) 547 wndm(:,:) = SQRT( zwnd_i(:,:) * zwnd_i(:,:) & 548 & + zwnd_j(:,:) * zwnd_j(:,:) ) * tmask(:,:,1) 549 550 ! ----------------------------------------------------------------------------- ! 551 ! I Solar FLUX ! 552 ! ----------------------------------------------------------------------------- ! 553 554 ! ocean albedo assumed to be constant + modify now Qsr to include the diurnal cycle ! Short Wave 555 zztmp = 1. - albo 556 IF( ln_dm2dc ) THEN 557 qsr(:,:) = zztmp * sbc_dcy( sf(jp_qsr)%fnow(:,:,1) ) * tmask(:,:,1) 558 ELSE 559 qsr(:,:) = zztmp * sf(jp_qsr)%fnow(:,:,1) * tmask(:,:,1) 560 ENDIF 561 562 563 ! ----------------------------------------------------------------------------- ! 564 ! II Turbulent FLUXES ! 565 ! ----------------------------------------------------------------------------- ! 566 567 ! specific humidity at SST 568 pssq(:,:) = rdct_qsat_salt * q_sat( zst(:,:), pslp(:,:) ) 569 570 IF( ln_skin_cs .OR. ln_skin_wl ) THEN 571 zztmp1(:,:) = zst(:,:) 572 zztmp2(:,:) = pssq(:,:) 573 ENDIF 574 575 ! specific humidity of air at "rn_zqt" m above the sea 576 SELECT CASE( nhumi ) 577 CASE( np_humi_sph ) 578 zqair(:,:) = phumi(:,:) ! what we read in file is already a spec. humidity! 579 CASE( np_humi_dpt ) 580 !IF(lwp) WRITE(numout,*) ' *** blk_oce => computing q_air out of d_air and slp !' !LBrm 581 zqair(:,:) = q_sat( phumi(:,:), pslp(:,:) ) 582 CASE( np_humi_rlh ) 583 !IF(lwp) WRITE(numout,*) ' *** blk_oce => computing q_air out of RH, t_air and slp !' !LBrm 584 zqair(:,:) = q_air_rh( 0.01_wp*phumi(:,:), ptair(:,:), pslp(:,:) ) !LB: 0.01 => RH is % percent in file 585 END SELECT 586 ! 587 ! potential temperature of air at "rn_zqt" m above the sea 588 IF( ln_abl ) THEN 589 ztpot = ptair(:,:) 590 ELSE 591 ! Estimate of potential temperature at z=rn_zqt, based on adiabatic lapse-rate 592 ! (see Josey, Gulev & Yu, 2013) / doi=10.1016/B978-0-12-391851-2.00005-2 593 ! (since reanalysis products provide T at z, not theta !) 594 !#LB: because AGRIF hates functions that return something else than a scalar, need to 595 ! use scalar version of gamma_moist() ... 596 DO jj = 1, jpj 597 DO ji = 1, jpi 598 ztpot(ji,jj) = ptair(ji,jj) + gamma_moist( ptair(ji,jj), zqair(ji,jj) ) * rn_zqt 599 END DO 600 END DO 601 ENDIF 602 603 604 605 !! Time to call the user-selected bulk parameterization for 606 !! == transfer coefficients ==! Cd, Ch, Ce at T-point, and more... 607 SELECT CASE( nblk ) 608 609 CASE( np_NCAR ) 610 CALL turb_ncar ( rn_zqt, rn_zu, zst, ztpot, pssq, zqair, wndm, & 611 & zcd_oce, zch_oce, zce_oce, t_zu, q_zu, zU_zu, cdn_oce, chn_oce, cen_oce ) 612 613 CASE( np_COARE_3p0 ) 614 CALL turb_coare3p0 ( kt, rn_zqt, rn_zu, zst, ztpot, pssq, zqair, wndm, ln_skin_cs, ln_skin_wl, & 615 & zcd_oce, zch_oce, zce_oce, t_zu, q_zu, zU_zu, cdn_oce, chn_oce, cen_oce, & 616 & Qsw=qsr(:,:), rad_lw=pqlw(:,:), slp=pslp(:,:) ) 617 618 CASE( np_COARE_3p6 ) 619 CALL turb_coare3p6 ( kt, rn_zqt, rn_zu, zst, ztpot, pssq, zqair, wndm, ln_skin_cs, ln_skin_wl, & 620 & zcd_oce, zch_oce, zce_oce, t_zu, q_zu, zU_zu, cdn_oce, chn_oce, cen_oce, & 621 & Qsw=qsr(:,:), rad_lw=pqlw(:,:), slp=pslp(:,:) ) 622 623 CASE( np_ECMWF ) 624 CALL turb_ecmwf ( kt, rn_zqt, rn_zu, zst, ztpot, pssq, zqair, wndm, ln_skin_cs, ln_skin_wl, & 625 & zcd_oce, zch_oce, zce_oce, t_zu, q_zu, zU_zu, cdn_oce, chn_oce, cen_oce, & 626 & Qsw=qsr(:,:), rad_lw=pqlw(:,:), slp=pslp(:,:) ) 627 628 CASE DEFAULT 629 CALL ctl_stop( 'STOP', 'sbc_oce: non-existing bulk formula selected' ) 630 631 END SELECT 632 633 IF( ln_skin_cs .OR. ln_skin_wl ) THEN 634 !! In the presence of sea-ice we forget about the cool-skin/warm-layer update of zst and pssq: 635 WHERE ( fr_i < 0.001_wp ) 636 ! zst and pssq have been updated by cool-skin/warm-layer scheme and we keep it!!! 637 zst(:,:) = zst(:,:)*tmask(:,:,1) 638 pssq(:,:) = pssq(:,:)*tmask(:,:,1) 639 ELSEWHERE 640 ! we forget about the update... 641 zst(:,:) = zztmp1(:,:) !#LB: using what we backed up before skin-algo 642 pssq(:,:) = zztmp2(:,:) !#LB: " " " 643 END WHERE 644 END IF 645 646 !! CALL iom_put( "Cd_oce", zcd_oce) ! output value of pure ocean-atm. transfer coef. 647 !! CALL iom_put( "Ch_oce", zch_oce) ! output value of pure ocean-atm. transfer coef. 648 649 IF( ABS(rn_zu - rn_zqt) < 0.1_wp ) THEN 650 !! If zu == zt, then ensuring once for all that: 651 t_zu(:,:) = ztpot(:,:) 652 q_zu(:,:) = zqair(:,:) 653 ENDIF 654 655 656 ! Turbulent fluxes over ocean => BULK_FORMULA @ sbcblk_phy.F90 657 ! ------------------------------------------------------------- 658 659 IF( ln_abl ) THEN !== ABL formulation ==! multiplication by rho_air and turbulent fluxes computation done in ablstp 660 !! FL do we need this multiplication by tmask ... ??? 661 DO jj = 1, jpj 662 DO ji = 1, jpi 663 zztmp = zU_zu(ji,jj) !* tmask(ji,jj,1) 664 wndm(ji,jj) = zztmp ! Store zU_zu in wndm to compute ustar2 in ablmod 665 pcd_du(ji,jj) = zztmp * zcd_oce(ji,jj) 666 psen(ji,jj) = zztmp * zch_oce(ji,jj) 667 pevp(ji,jj) = zztmp * zce_oce(ji,jj) 668 END DO 669 END DO 670 ELSE !== BLK formulation ==! turbulent fluxes computation 671 CALL BULK_FORMULA( rn_zu, zst(:,:), pssq(:,:), t_zu(:,:), q_zu(:,:), & 672 & zcd_oce(:,:), zch_oce(:,:), zce_oce(:,:), & 673 & wndm(:,:), zU_zu(:,:), pslp(:,:), & 674 & taum(:,:), psen(:,:), zqla(:,:), & 675 & pEvap=pevp(:,:), prhoa=rhoa(:,:) ) 676 677 zqla(:,:) = zqla(:,:) * tmask(:,:,1) 678 psen(:,:) = psen(:,:) * tmask(:,:,1) 679 taum(:,:) = taum(:,:) * tmask(:,:,1) 680 pevp(:,:) = pevp(:,:) * tmask(:,:,1) 681 682 ! Tau i and j component on T-grid points, using array "zcd_oce" as a temporary array... 683 zcd_oce = 0._wp 684 WHERE ( wndm > 0._wp ) zcd_oce = taum / wndm 685 zwnd_i = zcd_oce * zwnd_i 686 zwnd_j = zcd_oce * zwnd_j 687 688 CALL iom_put( "taum_oce", taum ) ! output wind stress module 689 690 ! ... utau, vtau at U- and V_points, resp. 691 ! Note the use of 0.5*(2-umask) in order to unmask the stress along coastlines 692 ! Note the use of MAX(tmask(i,j),tmask(i+1,j) is to mask tau over ice shelves 693 DO jj = 1, jpjm1 694 DO ji = 1, fs_jpim1 695 utau(ji,jj) = 0.5 * ( 2. - umask(ji,jj,1) ) * ( zwnd_i(ji,jj) + zwnd_i(ji+1,jj ) ) & 696 & * MAX(tmask(ji,jj,1),tmask(ji+1,jj,1)) 697 vtau(ji,jj) = 0.5 * ( 2. - vmask(ji,jj,1) ) * ( zwnd_j(ji,jj) + zwnd_j(ji ,jj+1) ) & 698 & * MAX(tmask(ji,jj,1),tmask(ji,jj+1,1)) 699 END DO 700 END DO 701 CALL lbc_lnk_multi( 'sbcblk', utau, 'U', -1., vtau, 'V', -1. ) 702 703 IF(ln_ctl) THEN 704 CALL prt_ctl( tab2d_1=wndm , clinfo1=' blk_oce_1: wndm : ') 705 CALL prt_ctl( tab2d_1=utau , clinfo1=' blk_oce_1: utau : ', mask1=umask, & 706 & tab2d_2=vtau , clinfo2=' vtau : ', mask2=vmask ) 707 ENDIF 708 ! 709 ENDIF 710 ! 711 IF(ln_ctl) THEN 712 CALL prt_ctl( tab2d_1=pevp , clinfo1=' blk_oce_1: pevp : ' ) 713 CALL prt_ctl( tab2d_1=psen , clinfo1=' blk_oce_1: psen : ' ) 714 CALL prt_ctl( tab2d_1=pssq , clinfo1=' blk_oce_1: pssq : ' ) 715 ENDIF 716 ! 717 END SUBROUTINE blk_oce_1 718 719 720 SUBROUTINE blk_oce_2( ptair, pqsr, pqlw, pprec, & ! <<= in 721 & psnow, pst , psen, pevp ) ! <<= in 722 !!--------------------------------------------------------------------- 723 !! *** ROUTINE blk_oce_2 *** 724 !! 725 !! ** Purpose : finalize the momentum, heat and freshwater fluxes computation 726 !! at the ocean surface at each time step knowing Cd, Ch, Ce and 727 !! atmospheric variables (from ABL or external data) 352 728 !! 353 729 !! ** Outputs : - utau : i-component of the stress at U-point (N/m2) … … 358 734 !! - qns : Non Solar heat flux over the ocean (W/m2) 359 735 !! - emp : evaporation minus precipitation (kg/m2/s) 360 !! 361 !! ** Nota : sf has to be a dummy argument for AGRIF on NEC 362 !!--------------------------------------------------------------------- 363 INTEGER , INTENT(in ) :: kt ! time step index 364 TYPE(fld), INTENT(inout), DIMENSION(:) :: sf ! input data 365 REAL(wp) , INTENT(in) , DIMENSION(:,:) :: pst ! surface temperature [Celcius] 366 REAL(wp) , INTENT(in) , DIMENSION(:,:) :: pu ! surface current at U-point (i-component) [m/s] 367 REAL(wp) , INTENT(in) , DIMENSION(:,:) :: pv ! surface current at V-point (j-component) [m/s] 736 !!--------------------------------------------------------------------- 737 REAL(wp), INTENT(in), DIMENSION(:,:) :: ptair 738 REAL(wp), INTENT(in), DIMENSION(:,:) :: pqsr 739 REAL(wp), INTENT(in), DIMENSION(:,:) :: pqlw 740 REAL(wp), INTENT(in), DIMENSION(:,:) :: pprec 741 REAL(wp), INTENT(in), DIMENSION(:,:) :: psnow 742 REAL(wp), INTENT(in), DIMENSION(:,:) :: pst ! surface temperature [Celcius] 743 REAL(wp), INTENT(in), DIMENSION(:,:) :: psen 744 REAL(wp), INTENT(in), DIMENSION(:,:) :: pevp 368 745 ! 369 746 INTEGER :: ji, jj ! dummy loop indices 370 REAL(wp) :: zztmp ! local variable 371 REAL(wp), DIMENSION(jpi,jpj) :: zwnd_i, zwnd_j ! wind speed components at T-point 372 REAL(wp), DIMENSION(jpi,jpj) :: zsq ! specific humidity at pst 373 REAL(wp), DIMENSION(jpi,jpj) :: zqlw, zqsb ! long wave and sensible heat fluxes 374 REAL(wp), DIMENSION(jpi,jpj) :: zqla, zevap ! latent heat fluxes and evaporation 747 REAL(wp) :: zztmp,zz1,zz2,zz3 ! local variable 748 REAL(wp), DIMENSION(jpi,jpj) :: zqlw ! long wave and sensible heat fluxes 749 REAL(wp), DIMENSION(jpi,jpj) :: zqla ! latent heat fluxes and evaporation 375 750 REAL(wp), DIMENSION(jpi,jpj) :: zst ! surface temperature in Kelvin 376 REAL(wp), DIMENSION(jpi,jpj) :: zU_zu ! bulk wind speed at height zu [m/s]377 REAL(wp), DIMENSION(jpi,jpj) :: ztpot ! potential temperature of air at z=rn_zqt [K]378 REAL(wp), DIMENSION(jpi,jpj) :: zrhoa ! density of air [kg/m^3]379 751 !!--------------------------------------------------------------------- 380 752 ! … … 382 754 zst(:,:) = pst(:,:) + rt0 ! convert SST from Celcius to Kelvin (and set minimum value far above 0 K) 383 755 756 384 757 ! ----------------------------------------------------------------------------- ! 385 ! 0 Wind components and module at T-point relative to the moving ocean!758 ! III Net longwave radiative FLUX ! 386 759 ! ----------------------------------------------------------------------------- ! 387 760 388 ! ... components ( U10m - U_oce ) at T-point (unmasked) 389 !!gm move zwnd_i (_j) set to zero inside the key_cyclone ??? 390 zwnd_i(:,:) = 0._wp 391 zwnd_j(:,:) = 0._wp 392 #if defined key_cyclone 393 CALL wnd_cyc( kt, zwnd_i, zwnd_j ) ! add analytical tropical cyclone (Vincent et al. JGR 2012) 394 DO jj = 2, jpjm1 395 DO ji = fs_2, fs_jpim1 ! vect. opt. 396 sf(jp_wndi)%fnow(ji,jj,1) = sf(jp_wndi)%fnow(ji,jj,1) + zwnd_i(ji,jj) 397 sf(jp_wndj)%fnow(ji,jj,1) = sf(jp_wndj)%fnow(ji,jj,1) + zwnd_j(ji,jj) 398 END DO 399 END DO 400 #endif 401 DO jj = 2, jpjm1 402 DO ji = fs_2, fs_jpim1 ! vect. opt. 403 zwnd_i(ji,jj) = ( sf(jp_wndi)%fnow(ji,jj,1) - rn_vfac * 0.5 * ( pu(ji-1,jj ) + pu(ji,jj) ) ) 404 zwnd_j(ji,jj) = ( sf(jp_wndj)%fnow(ji,jj,1) - rn_vfac * 0.5 * ( pv(ji ,jj-1) + pv(ji,jj) ) ) 405 END DO 406 END DO 407 CALL lbc_lnk_multi( 'sbcblk', zwnd_i, 'T', -1., zwnd_j, 'T', -1. ) 408 ! ... scalar wind ( = | U10m - U_oce | ) at T-point (masked) 409 wndm(:,:) = SQRT( zwnd_i(:,:) * zwnd_i(:,:) & 410 & + zwnd_j(:,:) * zwnd_j(:,:) ) * tmask(:,:,1) 411 412 ! ----------------------------------------------------------------------------- ! 413 ! I Radiative FLUXES ! 414 ! ----------------------------------------------------------------------------- ! 415 416 ! ocean albedo assumed to be constant + modify now Qsr to include the diurnal cycle ! Short Wave 417 zztmp = 1. - albo 418 IF( ln_dm2dc ) THEN ; qsr(:,:) = zztmp * sbc_dcy( sf(jp_qsr)%fnow(:,:,1) ) * tmask(:,:,1) 419 ELSE ; qsr(:,:) = zztmp * sf(jp_qsr)%fnow(:,:,1) * tmask(:,:,1) 420 ENDIF 421 422 zqlw(:,:) = ( sf(jp_qlw)%fnow(:,:,1) - Stef * zst(:,:)*zst(:,:)*zst(:,:)*zst(:,:) ) * tmask(:,:,1) ! Long Wave 423 424 ! ----------------------------------------------------------------------------- ! 425 ! II Turbulent FLUXES ! 426 ! ----------------------------------------------------------------------------- ! 427 428 ! ... specific humidity at SST and IST tmask( 429 zsq(:,:) = 0.98 * q_sat( zst(:,:), sf(jp_slp)%fnow(:,:,1) ) 430 !! 431 !! Estimate of potential temperature at z=rn_zqt, based on adiabatic lapse-rate 432 !! (see Josey, Gulev & Yu, 2013) / doi=10.1016/B978-0-12-391851-2.00005-2 433 !! (since reanalysis products provide T at z, not theta !) 434 ztpot = sf(jp_tair)%fnow(:,:,1) + gamma_moist( sf(jp_tair)%fnow(:,:,1), sf(jp_humi)%fnow(:,:,1) ) * rn_zqt 435 436 SELECT CASE( nblk ) !== transfer coefficients ==! Cd, Ch, Ce at T-point 437 ! 438 CASE( np_NCAR ) ; CALL turb_ncar ( rn_zqt, rn_zu, zst, ztpot, zsq, sf(jp_humi)%fnow, wndm, & ! NCAR-COREv2 439 & Cd_atm, Ch_atm, Ce_atm, t_zu, q_zu, zU_zu, cdn_oce, chn_oce, cen_oce ) 440 CASE( np_COARE_3p0 ) ; CALL turb_coare ( rn_zqt, rn_zu, zst, ztpot, zsq, sf(jp_humi)%fnow, wndm, & ! COARE v3.0 441 & Cd_atm, Ch_atm, Ce_atm, t_zu, q_zu, zU_zu, cdn_oce, chn_oce, cen_oce ) 442 CASE( np_COARE_3p5 ) ; CALL turb_coare3p5( rn_zqt, rn_zu, zst, ztpot, zsq, sf(jp_humi)%fnow, wndm, & ! COARE v3.5 443 & Cd_atm, Ch_atm, Ce_atm, t_zu, q_zu, zU_zu, cdn_oce, chn_oce, cen_oce ) 444 CASE( np_ECMWF ) ; CALL turb_ecmwf ( rn_zqt, rn_zu, zst, ztpot, zsq, sf(jp_humi)%fnow, wndm, & ! ECMWF 445 & Cd_atm, Ch_atm, Ce_atm, t_zu, q_zu, zU_zu, cdn_oce, chn_oce, cen_oce ) 446 CASE DEFAULT 447 CALL ctl_stop( 'STOP', 'sbc_oce: non-existing bulk formula selected' ) 448 END SELECT 449 450 ! ! Compute true air density : 451 IF( ABS(rn_zu - rn_zqt) > 0.01 ) THEN ! At zu: (probably useless to remove zrho*grav*rn_zu from SLP...) 452 zrhoa(:,:) = rho_air( t_zu(:,:) , q_zu(:,:) , sf(jp_slp)%fnow(:,:,1) ) 453 ELSE ! At zt: 454 zrhoa(:,:) = rho_air( sf(jp_tair)%fnow(:,:,1), sf(jp_humi)%fnow(:,:,1), sf(jp_slp)%fnow(:,:,1) ) 455 END IF 456 457 !! CALL iom_put( "Cd_oce", Cd_atm) ! output value of pure ocean-atm. transfer coef. 458 !! CALL iom_put( "Ch_oce", Ch_atm) ! output value of pure ocean-atm. transfer coef. 459 460 DO jj = 1, jpj ! tau module, i and j component 461 DO ji = 1, jpi 462 zztmp = zrhoa(ji,jj) * zU_zu(ji,jj) * Cd_atm(ji,jj) ! using bulk wind speed 463 taum (ji,jj) = zztmp * wndm (ji,jj) 464 zwnd_i(ji,jj) = zztmp * zwnd_i(ji,jj) 465 zwnd_j(ji,jj) = zztmp * zwnd_j(ji,jj) 466 END DO 467 END DO 468 469 ! ! add the HF tau contribution to the wind stress module 470 IF( lhftau ) taum(:,:) = taum(:,:) + sf(jp_tdif)%fnow(:,:,1) 471 472 CALL iom_put( "taum_oce", taum ) ! output wind stress module 473 474 ! ... utau, vtau at U- and V_points, resp. 475 ! Note the use of 0.5*(2-umask) in order to unmask the stress along coastlines 476 ! Note the use of MAX(tmask(i,j),tmask(i+1,j) is to mask tau over ice shelves 477 DO jj = 1, jpjm1 478 DO ji = 1, fs_jpim1 479 utau(ji,jj) = 0.5 * ( 2. - umask(ji,jj,1) ) * ( zwnd_i(ji,jj) + zwnd_i(ji+1,jj ) ) & 480 & * MAX(tmask(ji,jj,1),tmask(ji+1,jj,1)) 481 vtau(ji,jj) = 0.5 * ( 2. - vmask(ji,jj,1) ) * ( zwnd_j(ji,jj) + zwnd_j(ji ,jj+1) ) & 482 & * MAX(tmask(ji,jj,1),tmask(ji,jj+1,1)) 483 END DO 484 END DO 485 CALL lbc_lnk_multi( 'sbcblk', utau, 'U', -1., vtau, 'V', -1. ) 761 !! LB: now moved after Turbulent fluxes because must use the skin temperature rather that the SST 762 !! (zst is skin temperature if ln_skin_cs==.TRUE. .OR. ln_skin_wl==.TRUE.) 763 zqlw(:,:) = emiss_w * ( pqlw(:,:) - stefan*zst(:,:)*zst(:,:)*zst(:,:)*zst(:,:) ) * tmask(:,:,1) ! Net radiative longwave flux 486 764 487 765 ! Turbulent fluxes over ocean 488 766 ! ----------------------------- 489 767 490 ! zqla used as temporary array, for rho*U (common term of bulk formulae): 491 zqla(:,:) = zrhoa(:,:) * zU_zu(:,:) * tmask(:,:,1) 492 493 IF( ABS( rn_zu - rn_zqt) < 0.01_wp ) THEN 494 !! q_air and t_air are given at 10m (wind reference height) 495 zevap(:,:) = rn_efac*MAX( 0._wp, zqla(:,:)*Ce_atm(:,:)*(zsq(:,:) - sf(jp_humi)%fnow(:,:,1)) ) ! Evaporation, using bulk wind speed 496 zqsb (:,:) = cp_air(sf(jp_humi)%fnow(:,:,1))*zqla(:,:)*Ch_atm(:,:)*(zst(:,:) - ztpot(:,:) ) ! Sensible Heat, using bulk wind speed 497 ELSE 498 !! q_air and t_air are not given at 10m (wind reference height) 499 ! Values of temp. and hum. adjusted to height of wind during bulk algorithm iteration must be used!!! 500 zevap(:,:) = rn_efac*MAX( 0._wp, zqla(:,:)*Ce_atm(:,:)*(zsq(:,:) - q_zu(:,:) ) ) ! Evaporation, using bulk wind speed 501 zqsb (:,:) = cp_air(sf(jp_humi)%fnow(:,:,1))*zqla(:,:)*Ch_atm(:,:)*(zst(:,:) - t_zu(:,:) ) ! Sensible Heat, using bulk wind speed 502 ENDIF 503 504 zqla(:,:) = L_vap(zst(:,:)) * zevap(:,:) ! Latent Heat flux 505 768 ! use scalar version of L_vap() for AGRIF compatibility 769 DO jj = 1, jpj 770 DO ji = 1, jpi 771 zqla(ji,jj) = -1._wp * L_vap( zst(ji,jj) ) * pevp(ji,jj) ! Latent Heat flux !!GS: possibility to add a global qla to avoid recomputation after abl update 772 ENDDO 773 ENDDO 506 774 507 775 IF(ln_ctl) THEN 508 CALL prt_ctl( tab2d_1=zqla , clinfo1=' blk_oce: zqla : ', tab2d_2=Ce_atm , clinfo2=' Ce_oce : ' ) 509 CALL prt_ctl( tab2d_1=zqsb , clinfo1=' blk_oce: zqsb : ', tab2d_2=Ch_atm , clinfo2=' Ch_oce : ' ) 510 CALL prt_ctl( tab2d_1=zqlw , clinfo1=' blk_oce: zqlw : ', tab2d_2=qsr, clinfo2=' qsr : ' ) 511 CALL prt_ctl( tab2d_1=zsq , clinfo1=' blk_oce: zsq : ', tab2d_2=zst, clinfo2=' zst : ' ) 512 CALL prt_ctl( tab2d_1=utau , clinfo1=' blk_oce: utau : ', mask1=umask, & 513 & tab2d_2=vtau , clinfo2= ' vtau : ', mask2=vmask ) 514 CALL prt_ctl( tab2d_1=wndm , clinfo1=' blk_oce: wndm : ') 515 CALL prt_ctl( tab2d_1=zst , clinfo1=' blk_oce: zst : ') 776 CALL prt_ctl( tab2d_1=zqla , clinfo1=' blk_oce_2: zqla : ' ) 777 CALL prt_ctl( tab2d_1=zqlw , clinfo1=' blk_oce_2: zqlw : ', tab2d_2=qsr, clinfo2=' qsr : ' ) 778 516 779 ENDIF 517 780 518 781 ! ----------------------------------------------------------------------------- ! 519 ! I IITotal FLUXES !782 ! IV Total FLUXES ! 520 783 ! ----------------------------------------------------------------------------- ! 521 784 ! 522 emp (:,:) = ( zevap(:,:)& ! mass flux (evap. - precip.)523 & - sf(jp_prec)%fnow(:,:,1) * rn_pfac ) * tmask(:,:,1)524 ! 525 qns(:,:) = zqlw(:,:) - zqsb(:,:) - zqla(:,:)& ! Downward Non Solar526 & - sf(jp_snow)%fnow(:,:,1) * rn_pfac * rLfus & ! remove latent melting heat for solid precip527 & - zevap(:,:) * pst(:,:) * rcp & ! remove evap heat content at SST528 & + ( sf(jp_prec)%fnow(:,:,1) - sf(jp_snow)%fnow(:,:,1) ) * rn_pfac& ! add liquid precip heat content at Tair529 & * ( sf(jp_tair)%fnow(:,:,1) - rt0 ) * rcp &530 & + sf(jp_snow)%fnow(:,:,1) * rn_pfac & ! add solid precip heat content at min(Tair,Tsnow)531 & * ( MIN( sf(jp_tair)%fnow(:,:,1), rt0 ) - rt0 ) * rcpi785 emp (:,:) = ( pevp(:,:) & ! mass flux (evap. - precip.) 786 & - pprec(:,:) * rn_pfac ) * tmask(:,:,1) 787 ! 788 qns(:,:) = zqlw(:,:) + psen(:,:) + zqla(:,:) & ! Downward Non Solar 789 & - psnow(:,:) * rn_pfac * rLfus & ! remove latent melting heat for solid precip 790 & - pevp(:,:) * pst(:,:) * rcp & ! remove evap heat content at SST !LB??? pst is Celsius !? 791 & + ( pprec(:,:) - psnow(:,:) ) * rn_pfac & ! add liquid precip heat content at Tair 792 & * ( ptair(:,:) - rt0 ) * rcp & 793 & + psnow(:,:) * rn_pfac & ! add solid precip heat content at min(Tair,Tsnow) 794 & * ( MIN( ptair(:,:), rt0 ) - rt0 ) * rcpi 532 795 qns(:,:) = qns(:,:) * tmask(:,:,1) 533 796 ! 534 797 #if defined key_si3 535 qns_oce(:,:) = zqlw(:,:) - zqsb(:,:) - zqla(:,:)! non solar without emp (only needed by SI3)798 qns_oce(:,:) = zqlw(:,:) + psen(:,:) + zqla(:,:) ! non solar without emp (only needed by SI3) 536 799 qsr_oce(:,:) = qsr(:,:) 537 800 #endif 538 801 ! 802 CALL iom_put( "rho_air" , rhoa*tmask(:,:,1) ) ! output air density [kg/m^3] 803 CALL iom_put( "evap_oce" , pevp ) ! evaporation 804 CALL iom_put( "qlw_oce" , zqlw ) ! output downward longwave heat over the ocean 805 CALL iom_put( "qsb_oce" , psen ) ! output downward sensible heat over the ocean 806 CALL iom_put( "qla_oce" , zqla ) ! output downward latent heat over the ocean 807 tprecip(:,:) = pprec(:,:) * rn_pfac * tmask(:,:,1) ! output total precipitation [kg/m2/s] 808 sprecip(:,:) = psnow(:,:) * rn_pfac * tmask(:,:,1) ! output solid precipitation [kg/m2/s] 809 CALL iom_put( 'snowpre', sprecip ) ! Snow 810 CALL iom_put( 'precip' , tprecip ) ! Total precipitation 811 ! 539 812 IF ( nn_ice == 0 ) THEN 540 CALL iom_put( "qlw_oce" , zqlw ) ! output downward longwave heat over the ocean 541 CALL iom_put( "qsb_oce" , - zqsb ) ! output downward sensible heat over the ocean 542 CALL iom_put( "qla_oce" , - zqla ) ! output downward latent heat over the ocean 543 CALL iom_put( "qemp_oce", qns-zqlw+zqsb+zqla ) ! output downward heat content of E-P over the ocean 544 CALL iom_put( "qns_oce" , qns ) ! output downward non solar heat over the ocean 545 CALL iom_put( "qsr_oce" , qsr ) ! output downward solar heat over the ocean 546 CALL iom_put( "qt_oce" , qns+qsr ) ! output total downward heat over the ocean 547 tprecip(:,:) = sf(jp_prec)%fnow(:,:,1) * rn_pfac * tmask(:,:,1) ! output total precipitation [kg/m2/s] 548 sprecip(:,:) = sf(jp_snow)%fnow(:,:,1) * rn_pfac * tmask(:,:,1) ! output solid precipitation [kg/m2/s] 549 CALL iom_put( 'snowpre', sprecip ) ! Snow 550 CALL iom_put( 'precip' , tprecip ) ! Total precipitation 813 CALL iom_put( "qemp_oce" , qns-zqlw-psen-zqla ) ! output downward heat content of E-P over the ocean 814 CALL iom_put( "qns_oce" , qns ) ! output downward non solar heat over the ocean 815 CALL iom_put( "qsr_oce" , qsr ) ! output downward solar heat over the ocean 816 CALL iom_put( "qt_oce" , qns+qsr ) ! output total downward heat over the ocean 817 ENDIF 818 ! 819 IF( ln_skin_cs .OR. ln_skin_wl ) THEN 820 CALL iom_put( "t_skin" , (zst - rt0) * tmask(:,:,1) ) ! T_skin in Celsius 821 CALL iom_put( "dt_skin" , (zst - pst - rt0) * tmask(:,:,1) ) ! T_skin - SST temperature difference... 551 822 ENDIF 552 823 ! 553 824 IF(ln_ctl) THEN 554 CALL prt_ctl(tab2d_1=zqsb , clinfo1=' blk_oce: zqsb : ', tab2d_2=zqlw , clinfo2=' zqlw : ') 555 CALL prt_ctl(tab2d_1=zqla , clinfo1=' blk_oce: zqla : ', tab2d_2=qsr , clinfo2=' qsr : ') 556 CALL prt_ctl(tab2d_1=pst , clinfo1=' blk_oce: pst : ', tab2d_2=emp , clinfo2=' emp : ') 557 CALL prt_ctl(tab2d_1=utau , clinfo1=' blk_oce: utau : ', mask1=umask, & 558 & tab2d_2=vtau , clinfo2= ' vtau : ' , mask2=vmask ) 559 ENDIF 560 ! 561 END SUBROUTINE blk_oce 562 563 564 565 FUNCTION rho_air( ptak, pqa, pslp ) 566 !!------------------------------------------------------------------------------- 567 !! *** FUNCTION rho_air *** 568 !! 569 !! ** Purpose : compute density of (moist) air using the eq. of state of the atmosphere 570 !! 571 !! ** Author: L. Brodeau, june 2016 / AeroBulk (https://sourceforge.net/p/aerobulk) 572 !!------------------------------------------------------------------------------- 573 REAL(wp), DIMENSION(jpi,jpj), INTENT(in) :: ptak ! air temperature [K] 574 REAL(wp), DIMENSION(jpi,jpj), INTENT(in) :: pqa ! air specific humidity [kg/kg] 575 REAL(wp), DIMENSION(jpi,jpj), INTENT(in) :: pslp ! pressure in [Pa] 576 REAL(wp), DIMENSION(jpi,jpj) :: rho_air ! density of moist air [kg/m^3] 577 !!------------------------------------------------------------------------------- 578 ! 579 rho_air = pslp / ( R_dry*ptak * ( 1._wp + rctv0*pqa ) ) 580 ! 581 END FUNCTION rho_air 582 583 584 FUNCTION cp_air( pqa ) 585 !!------------------------------------------------------------------------------- 586 !! *** FUNCTION cp_air *** 587 !! 588 !! ** Purpose : Compute specific heat (Cp) of moist air 589 !! 590 !! ** Author: L. Brodeau, june 2016 / AeroBulk (https://sourceforge.net/p/aerobulk) 591 !!------------------------------------------------------------------------------- 592 REAL(wp), DIMENSION(jpi,jpj), INTENT(in) :: pqa ! air specific humidity [kg/kg] 593 REAL(wp), DIMENSION(jpi,jpj) :: cp_air ! specific heat of moist air [J/K/kg] 594 !!------------------------------------------------------------------------------- 595 ! 596 Cp_air = Cp_dry + Cp_vap * pqa 597 ! 598 END FUNCTION cp_air 599 600 601 FUNCTION q_sat( ptak, pslp ) 602 !!---------------------------------------------------------------------------------- 603 !! *** FUNCTION q_sat *** 604 !! 605 !! ** Purpose : Specific humidity at saturation in [kg/kg] 606 !! Based on accurate estimate of "e_sat" 607 !! aka saturation water vapor (Goff, 1957) 608 !! 609 !! ** Author: L. Brodeau, june 2016 / AeroBulk (https://sourceforge.net/p/aerobulk) 610 !!---------------------------------------------------------------------------------- 611 REAL(wp), DIMENSION(jpi,jpj), INTENT(in) :: ptak ! air temperature [K] 612 REAL(wp), DIMENSION(jpi,jpj), INTENT(in) :: pslp ! sea level atmospheric pressure [Pa] 613 REAL(wp), DIMENSION(jpi,jpj) :: q_sat ! Specific humidity at saturation [kg/kg] 614 ! 615 INTEGER :: ji, jj ! dummy loop indices 616 REAL(wp) :: ze_sat, ztmp ! local scalar 617 !!---------------------------------------------------------------------------------- 618 ! 619 DO jj = 1, jpj 620 DO ji = 1, jpi 621 ! 622 ztmp = rt0 / ptak(ji,jj) 623 ! 624 ! Vapour pressure at saturation [hPa] : WMO, (Goff, 1957) 625 ze_sat = 10.**( 10.79574*(1. - ztmp) - 5.028*LOG10(ptak(ji,jj)/rt0) & 626 & + 1.50475*10.**(-4)*(1. - 10.**(-8.2969*(ptak(ji,jj)/rt0 - 1.)) ) & 627 & + 0.42873*10.**(-3)*(10.**(4.76955*(1. - ztmp)) - 1.) + 0.78614 ) 628 ! 629 q_sat(ji,jj) = reps0 * ze_sat/( 0.01_wp*pslp(ji,jj) - (1._wp - reps0)*ze_sat ) ! 0.01 because SLP is in [Pa] 630 ! 631 END DO 632 END DO 633 ! 634 END FUNCTION q_sat 635 636 637 FUNCTION gamma_moist( ptak, pqa ) 638 !!---------------------------------------------------------------------------------- 639 !! *** FUNCTION gamma_moist *** 640 !! 641 !! ** Purpose : Compute the moist adiabatic lapse-rate. 642 !! => http://glossary.ametsoc.org/wiki/Moist-adiabatic_lapse_rate 643 !! => http://www.geog.ucsb.edu/~joel/g266_s10/lecture_notes/chapt03/oh10_3_01/oh10_3_01.html 644 !! 645 !! ** Author: L. Brodeau, june 2016 / AeroBulk (https://sourceforge.net/p/aerobulk) 646 !!---------------------------------------------------------------------------------- 647 REAL(wp), DIMENSION(jpi,jpj), INTENT(in) :: ptak ! air temperature [K] 648 REAL(wp), DIMENSION(jpi,jpj), INTENT(in) :: pqa ! specific humidity [kg/kg] 649 REAL(wp), DIMENSION(jpi,jpj) :: gamma_moist ! moist adiabatic lapse-rate 650 ! 651 INTEGER :: ji, jj ! dummy loop indices 652 REAL(wp) :: zrv, ziRT ! local scalar 653 !!---------------------------------------------------------------------------------- 654 ! 655 DO jj = 1, jpj 656 DO ji = 1, jpi 657 zrv = pqa(ji,jj) / (1. - pqa(ji,jj)) 658 ziRT = 1. / (R_dry*ptak(ji,jj)) ! 1/RT 659 gamma_moist(ji,jj) = grav * ( 1. + rLevap*zrv*ziRT ) / ( Cp_dry + rLevap*rLevap*zrv*reps0*ziRT/ptak(ji,jj) ) 660 END DO 661 END DO 662 ! 663 END FUNCTION gamma_moist 664 665 666 FUNCTION L_vap( psst ) 667 !!--------------------------------------------------------------------------------- 668 !! *** FUNCTION L_vap *** 669 !! 670 !! ** Purpose : Compute the latent heat of vaporization of water from temperature 671 !! 672 !! ** Author: L. Brodeau, june 2016 / AeroBulk (https://sourceforge.net/p/aerobulk) 673 !!---------------------------------------------------------------------------------- 674 REAL(wp), DIMENSION(jpi,jpj) :: L_vap ! latent heat of vaporization [J/kg] 675 REAL(wp), DIMENSION(jpi,jpj), INTENT(in) :: psst ! water temperature [K] 676 !!---------------------------------------------------------------------------------- 677 ! 678 L_vap = ( 2.501 - 0.00237 * ( psst(:,:) - rt0) ) * 1.e6 679 ! 680 END FUNCTION L_vap 825 CALL prt_ctl(tab2d_1=zqlw , clinfo1=' blk_oce_2: zqlw : ') 826 CALL prt_ctl(tab2d_1=zqla , clinfo1=' blk_oce_2: zqla : ', tab2d_2=qsr , clinfo2=' qsr : ') 827 CALL prt_ctl(tab2d_1=emp , clinfo1=' blk_oce_2: emp : ') 828 ENDIF 829 ! 830 END SUBROUTINE blk_oce_2 831 681 832 682 833 #if defined key_si3 … … 684 835 !! 'key_si3' SI3 sea-ice model 685 836 !!---------------------------------------------------------------------- 686 !! blk_ice_ tau: provide the air-ice stress687 !! blk_ice_ flx: provide the heat and mass fluxes at air-ice interface837 !! blk_ice_1 : provide the air-ice stress 838 !! blk_ice_2 : provide the heat and mass fluxes at air-ice interface 688 839 !! blk_ice_qcn : provide ice surface temperature and snow/ice conduction flux (emulating conduction flux) 689 840 !! Cdn10_Lupkes2012 : Lupkes et al. (2012) air-ice drag 690 !! Cdn10_Lupkes2015 : Lupkes et al. (2015) air-ice drag 841 !! Cdn10_Lupkes2015 : Lupkes et al. (2015) air-ice drag 691 842 !!---------------------------------------------------------------------- 692 843 693 SUBROUTINE blk_ice_tau 694 !!--------------------------------------------------------------------- 695 !! *** ROUTINE blk_ice_tau *** 844 SUBROUTINE blk_ice_1( pwndi, pwndj, ptair, phumi, pslp , puice, pvice, ptsui, & ! inputs 845 & putaui, pvtaui, pseni, pevpi, pssqi, pcd_dui ) ! optional outputs 846 !!--------------------------------------------------------------------- 847 !! *** ROUTINE blk_ice_1 *** 696 848 !! 697 849 !! ** Purpose : provide the surface boundary condition over sea-ice … … 701 853 !! NB: ice drag coefficient is assumed to be a constant 702 854 !!--------------------------------------------------------------------- 855 REAL(wp) , INTENT(in ), DIMENSION(:,: ) :: pslp ! sea-level pressure [Pa] 856 REAL(wp) , INTENT(in ), DIMENSION(:,: ) :: pwndi ! atmospheric wind at T-point [m/s] 857 REAL(wp) , INTENT(in ), DIMENSION(:,: ) :: pwndj ! atmospheric wind at T-point [m/s] 858 REAL(wp) , INTENT(in ), DIMENSION(:,: ) :: ptair ! atmospheric wind at T-point [m/s] 859 REAL(wp) , INTENT(in ), DIMENSION(:,: ) :: phumi ! atmospheric wind at T-point [m/s] 860 REAL(wp) , INTENT(in ), DIMENSION(:,: ) :: puice ! sea-ice velocity on I or C grid [m/s] 861 REAL(wp) , INTENT(in ), DIMENSION(:,: ) :: pvice ! " 862 REAL(wp) , INTENT(in ), DIMENSION(:,: ) :: ptsui ! sea-ice surface temperature [K] 863 REAL(wp) , INTENT( out), DIMENSION(:,: ), OPTIONAL :: putaui ! if ln_blk 864 REAL(wp) , INTENT( out), DIMENSION(:,: ), OPTIONAL :: pvtaui ! if ln_blk 865 REAL(wp) , INTENT( out), DIMENSION(:,: ), OPTIONAL :: pseni ! if ln_abl 866 REAL(wp) , INTENT( out), DIMENSION(:,: ), OPTIONAL :: pevpi ! if ln_abl 867 REAL(wp) , INTENT( out), DIMENSION(:,: ), OPTIONAL :: pssqi ! if ln_abl 868 REAL(wp) , INTENT( out), DIMENSION(:,: ), OPTIONAL :: pcd_dui ! if ln_abl 869 ! 703 870 INTEGER :: ji, jj ! dummy loop indices 704 REAL(wp) :: zwndi_f , zwndj_f, zwnorm_f ! relative wind module and components at F-point705 871 REAL(wp) :: zwndi_t , zwndj_t ! relative wind components at T-point 706 REAL(wp), DIMENSION(jpi,jpj) :: zrhoa ! transfer coefficient for momentum (tau) 707 !!--------------------------------------------------------------------- 708 ! 709 ! set transfer coefficients to default sea-ice values 710 Cd_atm(:,:) = Cd_ice 711 Ch_atm(:,:) = Cd_ice 712 Ce_atm(:,:) = Cd_ice 713 714 wndm_ice(:,:) = 0._wp !!gm brutal.... 872 REAL(wp) :: zootm_su ! sea-ice surface mean temperature 873 REAL(wp) :: zztmp1, zztmp2 ! temporary arrays 874 REAL(wp), DIMENSION(jpi,jpj) :: zcd_dui ! transfer coefficient for momentum (tau) 875 !!--------------------------------------------------------------------- 876 ! 715 877 716 878 ! ------------------------------------------------------------ ! … … 720 882 DO jj = 2, jpjm1 721 883 DO ji = fs_2, fs_jpim1 ! vect. opt. 722 zwndi_t = ( sf(jp_wndi)%fnow(ji,jj,1) - rn_vfac * 0.5 * ( u_ice(ji-1,jj ) + u_ice(ji,jj) ) )723 zwndj_t = ( sf(jp_wndj)%fnow(ji,jj,1) - rn_vfac * 0.5 * ( v_ice(ji ,jj-1) + v_ice(ji,jj) ) )884 zwndi_t = ( pwndi(ji,jj) - rn_vfac * 0.5_wp * ( puice(ji-1,jj ) + puice(ji,jj) ) ) 885 zwndj_t = ( pwndj(ji,jj) - rn_vfac * 0.5_wp * ( pvice(ji ,jj-1) + pvice(ji,jj) ) ) 724 886 wndm_ice(ji,jj) = SQRT( zwndi_t * zwndi_t + zwndj_t * zwndj_t ) * tmask(ji,jj,1) 725 887 END DO … … 729 891 ! Make ice-atm. drag dependent on ice concentration 730 892 IF ( ln_Cd_L12 ) THEN ! calculate new drag from Lupkes(2012) equations 731 CALL Cdn10_Lupkes2012( Cd_atm ) 732 Ch_atm(:,:) = Cd_atm(:,:) ! momentum and heat transfer coef. are considered identical 893 CALL Cdn10_Lupkes2012( Cd_ice ) 894 Ch_ice(:,:) = Cd_ice(:,:) ! momentum and heat transfer coef. are considered identical 895 Ce_ice(:,:) = Cd_ice(:,:) 733 896 ELSEIF( ln_Cd_L15 ) THEN ! calculate new drag from Lupkes(2015) equations 734 CALL Cdn10_Lupkes2015( Cd_atm, Ch_atm ) 735 ENDIF 736 737 !! CALL iom_put( "Cd_ice", Cd_atm) ! output value of pure ice-atm. transfer coef. 738 !! CALL iom_put( "Ch_ice", Ch_atm) ! output value of pure ice-atm. transfer coef. 897 CALL Cdn10_Lupkes2015( ptsui, pslp, Cd_ice, Ch_ice ) 898 Ce_ice(:,:) = Ch_ice(:,:) ! sensible and latent heat transfer coef. are considered identical 899 ENDIF 900 901 !! IF ( iom_use("Cd_ice") ) CALL iom_put("Cd_ice", Cd_ice) ! output value of pure ice-atm. transfer coef. 902 !! IF ( iom_use("Ch_ice") ) CALL iom_put("Ch_ice", Ch_ice) ! output value of pure ice-atm. transfer coef. 739 903 740 904 ! local scalars ( place there for vector optimisation purposes) 741 ! Computing density of air! Way denser that 1.2 over sea-ice !!! 742 zrhoa (:,:) = rho_air(sf(jp_tair)%fnow(:,:,1), sf(jp_humi)%fnow(:,:,1), sf(jp_slp)%fnow(:,:,1)) 743 744 !!gm brutal.... 745 utau_ice (:,:) = 0._wp 746 vtau_ice (:,:) = 0._wp 747 !!gm end 748 749 ! ------------------------------------------------------------ ! 750 ! Wind stress relative to the moving ice ( U10m - U_ice ) ! 751 ! ------------------------------------------------------------ ! 752 ! C-grid ice dynamics : U & V-points (same as ocean) 753 DO jj = 2, jpjm1 754 DO ji = fs_2, fs_jpim1 ! vect. opt. 755 utau_ice(ji,jj) = 0.5 * zrhoa(ji,jj) * Cd_atm(ji,jj) * ( wndm_ice(ji+1,jj ) + wndm_ice(ji,jj) ) & 756 & * ( 0.5 * (sf(jp_wndi)%fnow(ji+1,jj,1) + sf(jp_wndi)%fnow(ji,jj,1) ) - rn_vfac * u_ice(ji,jj) ) 757 vtau_ice(ji,jj) = 0.5 * zrhoa(ji,jj) * Cd_atm(ji,jj) * ( wndm_ice(ji,jj+1 ) + wndm_ice(ji,jj) ) & 758 & * ( 0.5 * (sf(jp_wndj)%fnow(ji,jj+1,1) + sf(jp_wndj)%fnow(ji,jj,1) ) - rn_vfac * v_ice(ji,jj) ) 905 !IF (ln_abl) rhoa (:,:) = rho_air( ptair(:,:), phumi(:,:), pslp(:,:) ) !!GS: rhoa must be (re)computed here with ABL to avoid division by zero after (TBI) 906 zcd_dui(:,:) = wndm_ice(:,:) * Cd_ice(:,:) 907 908 IF( ln_blk ) THEN 909 ! ------------------------------------------------------------ ! 910 ! Wind stress relative to the moving ice ( U10m - U_ice ) ! 911 ! ------------------------------------------------------------ ! 912 ! C-grid ice dynamics : U & V-points (same as ocean) 913 DO jj = 2, jpjm1 914 DO ji = fs_2, fs_jpim1 ! vect. opt. 915 putaui(ji,jj) = 0.5_wp * ( rhoa(ji+1,jj) * zcd_dui(ji+1,jj) & 916 & + rhoa(ji ,jj) * zcd_dui(ji ,jj) ) & 917 & * ( 0.5_wp * ( pwndi(ji+1,jj) + pwndi(ji,jj) ) - rn_vfac * puice(ji,jj) ) 918 pvtaui(ji,jj) = 0.5_wp * ( rhoa(ji,jj+1) * zcd_dui(ji,jj+1) & 919 & + rhoa(ji,jj ) * zcd_dui(ji,jj ) ) & 920 & * ( 0.5_wp * ( pwndj(ji,jj+1) + pwndj(ji,jj) ) - rn_vfac * pvice(ji,jj) ) 921 END DO 759 922 END DO 760 END DO 761 CALL lbc_lnk_multi( 'sbcblk', utau_ice, 'U', -1., vtau_ice, 'V', -1. ) 762 ! 763 ! 764 IF(ln_ctl) THEN 765 CALL prt_ctl(tab2d_1=utau_ice , clinfo1=' blk_ice: utau_ice : ', tab2d_2=vtau_ice , clinfo2=' vtau_ice : ') 766 CALL prt_ctl(tab2d_1=wndm_ice , clinfo1=' blk_ice: wndm_ice : ') 767 ENDIF 768 ! 769 END SUBROUTINE blk_ice_tau 770 771 772 SUBROUTINE blk_ice_flx( ptsu, phs, phi, palb ) 773 !!--------------------------------------------------------------------- 774 !! *** ROUTINE blk_ice_flx *** 923 CALL lbc_lnk_multi( 'sbcblk', putaui, 'U', -1., pvtaui, 'V', -1. ) 924 ! 925 IF(ln_ctl) CALL prt_ctl( tab2d_1=putaui , clinfo1=' blk_ice: putaui : ' & 926 & , tab2d_2=pvtaui , clinfo2=' pvtaui : ' ) 927 ELSE 928 zztmp1 = 11637800.0_wp 929 zztmp2 = -5897.8_wp 930 DO jj = 1, jpj 931 DO ji = 1, jpi 932 pcd_dui(ji,jj) = zcd_dui (ji,jj) 933 pseni (ji,jj) = wndm_ice(ji,jj) * Ch_ice(ji,jj) 934 pevpi (ji,jj) = wndm_ice(ji,jj) * Ce_ice(ji,jj) 935 zootm_su = zztmp2 / ptsui(ji,jj) ! ptsui is in K (it can't be zero ??) 936 pssqi (ji,jj) = zztmp1 * EXP( zootm_su ) / rhoa(ji,jj) 937 END DO 938 END DO 939 ENDIF 940 ! 941 IF(ln_ctl) CALL prt_ctl(tab2d_1=wndm_ice , clinfo1=' blk_ice: wndm_ice : ') 942 ! 943 END SUBROUTINE blk_ice_1 944 945 946 SUBROUTINE blk_ice_2( ptsu, phs, phi, palb, ptair, phumi, pslp, pqlw, pprec, psnow ) 947 !!--------------------------------------------------------------------- 948 !! *** ROUTINE blk_ice_2 *** 775 949 !! 776 950 !! ** Purpose : provide the heat and mass fluxes at air-ice interface … … 782 956 !! caution : the net upward water flux has with mm/day unit 783 957 !!--------------------------------------------------------------------- 784 REAL(wp), DIMENSION(:,:,:), INTENT(in) :: ptsu ! sea ice surface temperature 958 REAL(wp), DIMENSION(:,:,:), INTENT(in) :: ptsu ! sea ice surface temperature [K] 785 959 REAL(wp), DIMENSION(:,:,:), INTENT(in) :: phs ! snow thickness 786 960 REAL(wp), DIMENSION(:,:,:), INTENT(in) :: phi ! ice thickness 787 961 REAL(wp), DIMENSION(:,:,:), INTENT(in) :: palb ! ice albedo (all skies) 962 REAL(wp), DIMENSION(:,: ), INTENT(in) :: ptair 963 REAL(wp), DIMENSION(:,: ), INTENT(in) :: phumi 964 REAL(wp), DIMENSION(:,: ), INTENT(in) :: pslp 965 REAL(wp), DIMENSION(:,: ), INTENT(in) :: pqlw 966 REAL(wp), DIMENSION(:,: ), INTENT(in) :: pprec 967 REAL(wp), DIMENSION(:,: ), INTENT(in) :: psnow 788 968 !! 789 969 INTEGER :: ji, jj, jl ! dummy loop indices 790 970 REAL(wp) :: zst3 ! local variable 791 971 REAL(wp) :: zcoef_dqlw, zcoef_dqla ! - - 792 REAL(wp) :: zztmp, z 1_rLsub! - -972 REAL(wp) :: zztmp, zztmp2, z1_rLsub ! - - 793 973 REAL(wp) :: zfr1, zfr2 ! local variables 794 974 REAL(wp), DIMENSION(jpi,jpj,jpl) :: z1_st ! inverse of surface temperature … … 798 978 REAL(wp), DIMENSION(jpi,jpj,jpl) :: z_dqsb ! sensible heat sensitivity over ice 799 979 REAL(wp), DIMENSION(jpi,jpj) :: zevap, zsnw ! evaporation and snw distribution after wind blowing (SI3) 800 REAL(wp), DIMENSION(jpi,jpj) :: zrhoa 801 !!--------------------------------------------------------------------- 802 ! 803 zcoef_dqlw = 4.0 * 0.95 * Stef ! local scalars 804 zcoef_dqla = -Ls * 11637800. * (-5897.8) 805 ! 806 zrhoa(:,:) = rho_air( sf(jp_tair)%fnow(:,:,1), sf(jp_humi)%fnow(:,:,1), sf(jp_slp)%fnow(:,:,1) ) 980 REAL(wp), DIMENSION(jpi,jpj) :: zqair ! specific humidity of air at z=rn_zqt [kg/kg] !LB 981 !!--------------------------------------------------------------------- 982 ! 983 zcoef_dqlw = 4._wp * 0.95_wp * stefan ! local scalars 984 zcoef_dqla = -rLsub * 11637800._wp * (-5897.8_wp) !LB: BAD! 985 ! 986 SELECT CASE( nhumi ) 987 CASE( np_humi_sph ) 988 zqair(:,:) = phumi(:,:) ! what we read in file is already a spec. humidity! 989 CASE( np_humi_dpt ) 990 zqair(:,:) = q_sat( phumi(:,:), pslp ) 991 CASE( np_humi_rlh ) 992 zqair(:,:) = q_air_rh( 0.01_wp*phumi(:,:), ptair(:,:), pslp(:,:) ) !LB: 0.01 => RH is % percent in file 993 END SELECT 807 994 ! 808 995 zztmp = 1. / ( 1. - albo ) 809 WHERE( ptsu(:,:,:) /= 0._wp ) ; z1_st(:,:,:) = 1._wp / ptsu(:,:,:) 810 ELSEWHERE ; z1_st(:,:,:) = 0._wp 996 WHERE( ptsu(:,:,:) /= 0._wp ) 997 z1_st(:,:,:) = 1._wp / ptsu(:,:,:) 998 ELSEWHERE 999 z1_st(:,:,:) = 0._wp 811 1000 END WHERE 812 1001 ! ! ========================== ! … … 822 1011 qsr_ice(ji,jj,jl) = zztmp * ( 1. - palb(ji,jj,jl) ) * qsr(ji,jj) 823 1012 ! Long Wave (lw) 824 z_qlw(ji,jj,jl) = 0.95 * ( sf(jp_qlw)%fnow(ji,jj,1) - Stef* ptsu(ji,jj,jl) * zst3 ) * tmask(ji,jj,1)1013 z_qlw(ji,jj,jl) = 0.95 * ( pqlw(ji,jj) - stefan * ptsu(ji,jj,jl) * zst3 ) * tmask(ji,jj,1) 825 1014 ! lw sensitivity 826 1015 z_dqlw(ji,jj,jl) = zcoef_dqlw * zst3 … … 830 1019 ! ----------------------------! 831 1020 832 ! ... turbulent heat fluxes with Ch_ atm recalculated in blk_ice_tau1021 ! ... turbulent heat fluxes with Ch_ice recalculated in blk_ice_1 833 1022 ! Sensible Heat 834 z_qsb(ji,jj,jl) = zrhoa(ji,jj) * cpa * Ch_atm(ji,jj) * wndm_ice(ji,jj) * (ptsu(ji,jj,jl) - sf(jp_tair)%fnow(ji,jj,1))1023 z_qsb(ji,jj,jl) = rhoa(ji,jj) * rCp_air * Ch_ice(ji,jj) * wndm_ice(ji,jj) * (ptsu(ji,jj,jl) - ptair(ji,jj)) 835 1024 ! Latent Heat 836 qla_ice(ji,jj,jl) = rn_efac * MAX( 0.e0, zrhoa(ji,jj) * Ls * Ch_atm(ji,jj) * wndm_ice(ji,jj) * & 837 & ( 11637800. * EXP( -5897.8 * z1_st(ji,jj,jl) ) / zrhoa(ji,jj) - sf(jp_humi)%fnow(ji,jj,1) ) ) 1025 zztmp2 = EXP( -5897.8 * z1_st(ji,jj,jl) ) 1026 qla_ice(ji,jj,jl) = rn_efac * MAX( 0.e0, rhoa(ji,jj) * rLsub * Ce_ice(ji,jj) * wndm_ice(ji,jj) * & 1027 & ( 11637800. * zztmp2 / rhoa(ji,jj) - zqair(ji,jj) ) ) 838 1028 ! Latent heat sensitivity for ice (Dqla/Dt) 839 1029 IF( qla_ice(ji,jj,jl) > 0._wp ) THEN 840 dqla_ice(ji,jj,jl) = rn_efac * zcoef_dqla * C h_atm(ji,jj) * wndm_ice(ji,jj) * &841 & z1_st(ji,jj,jl) *z1_st(ji,jj,jl) * EXP(-5897.8 * z1_st(ji,jj,jl))1030 dqla_ice(ji,jj,jl) = rn_efac * zcoef_dqla * Ce_ice(ji,jj) * wndm_ice(ji,jj) * & 1031 & z1_st(ji,jj,jl) * z1_st(ji,jj,jl) * zztmp2 842 1032 ELSE 843 1033 dqla_ice(ji,jj,jl) = 0._wp … … 845 1035 846 1036 ! Sensible heat sensitivity (Dqsb_ice/Dtn_ice) 847 z_dqsb(ji,jj,jl) = zrhoa(ji,jj) * cpa * Ch_atm(ji,jj) * wndm_ice(ji,jj)1037 z_dqsb(ji,jj,jl) = rhoa(ji,jj) * rCp_air * Ch_ice(ji,jj) * wndm_ice(ji,jj) 848 1038 849 1039 ! ----------------------------! … … 860 1050 END DO 861 1051 ! 862 tprecip(:,:) = sf(jp_prec)%fnow(:,:,1) * rn_pfac * tmask(:,:,1) ! total precipitation [kg/m2/s]863 sprecip(:,:) = sf(jp_snow)%fnow(:,:,1) * rn_pfac * tmask(:,:,1) ! solid precipitation [kg/m2/s]864 CALL iom_put( 'snowpre', sprecip ) 865 CALL iom_put( 'precip' , tprecip ) 1052 tprecip(:,:) = pprec(:,:) * rn_pfac * tmask(:,:,1) ! total precipitation [kg/m2/s] 1053 sprecip(:,:) = psnow(:,:) * rn_pfac * tmask(:,:,1) ! solid precipitation [kg/m2/s] 1054 CALL iom_put( 'snowpre', sprecip ) ! Snow precipitation 1055 CALL iom_put( 'precip' , tprecip ) ! Total precipitation 866 1056 867 1057 ! --- evaporation --- ! … … 880 1070 ! --- heat flux associated with emp --- ! 881 1071 qemp_oce(:,:) = - ( 1._wp - at_i_b(:,:) ) * zevap(:,:) * sst_m(:,:) * rcp & ! evap at sst 882 & + ( tprecip(:,:) - sprecip(:,:) ) * ( sf(jp_tair)%fnow(:,:,1) - rt0 ) * rcp& ! liquid precip at Tair1072 & + ( tprecip(:,:) - sprecip(:,:) ) * ( ptair(:,:) - rt0 ) * rcp & ! liquid precip at Tair 883 1073 & + sprecip(:,:) * ( 1._wp - zsnw ) * & ! solid precip at min(Tair,Tsnow) 884 & ( ( MIN( sf(jp_tair)%fnow(:,:,1), rt0 ) - rt0 ) * rcpi * tmask(:,:,1) - rLfus )1074 & ( ( MIN( ptair(:,:), rt0 ) - rt0 ) * rcpi * tmask(:,:,1) - rLfus ) 885 1075 qemp_ice(:,:) = sprecip(:,:) * zsnw * & ! solid precip (only) 886 & ( ( MIN( sf(jp_tair)%fnow(:,:,1), rt0 ) - rt0 ) * rcpi * tmask(:,:,1) - rLfus )1076 & ( ( MIN( ptair(:,:), rt0 ) - rt0 ) * rcpi * tmask(:,:,1) - rLfus ) 887 1077 888 1078 ! --- total solar and non solar fluxes --- ! … … 892 1082 893 1083 ! --- heat content of precip over ice in J/m3 (to be used in 1D-thermo) --- ! 894 qprec_ice(:,:) = rhos * ( ( MIN( sf(jp_tair)%fnow(:,:,1), rt0 ) - rt0 ) * rcpi * tmask(:,:,1) - rLfus )1084 qprec_ice(:,:) = rhos * ( ( MIN( ptair(:,:), rt0 ) - rt0 ) * rcpi * tmask(:,:,1) - rLfus ) 895 1085 896 1086 ! --- heat content of evap over ice in W/m2 (to be used in 1D-thermo) --- 897 1087 DO jl = 1, jpl 898 1088 qevap_ice(:,:,jl) = 0._wp ! should be -evap_ice(:,:,jl)*( ( Tice - rt0 ) * rcpi * tmask(:,:,1) ) 899 ! ! But we do not have Tice => consider it at 0degC => evap=0 1089 ! ! But we do not have Tice => consider it at 0degC => evap=0 900 1090 END DO 901 1091 … … 904 1094 zfr2 = ( 0.82 * ( 1.0 - cldf_ice ) + 0.65 * cldf_ice ) ! zfr2 such that zfr1 + zfr2 to equal 1 905 1095 ! 906 WHERE ( phs(:,:,:) <= 0._wp .AND. phi(:,:,:) < 0.1_wp ) ! linear decrease from hi=0 to 10cm 1096 WHERE ( phs(:,:,:) <= 0._wp .AND. phi(:,:,:) < 0.1_wp ) ! linear decrease from hi=0 to 10cm 907 1097 qtr_ice_top(:,:,:) = qsr_ice(:,:,:) * ( zfr1 + zfr2 * ( 1._wp - phi(:,:,:) * 10._wp ) ) 908 1098 ELSEWHERE( phs(:,:,:) <= 0._wp .AND. phi(:,:,:) >= 0.1_wp ) ! constant (zfr1) when hi>10cm 909 1099 qtr_ice_top(:,:,:) = qsr_ice(:,:,:) * zfr1 910 1100 ELSEWHERE ! zero when hs>0 911 qtr_ice_top(:,:,:) = 0._wp 1101 qtr_ice_top(:,:,:) = 0._wp 912 1102 END WHERE 913 1103 ! … … 921 1111 ENDIF 922 1112 ! 923 END SUBROUTINE blk_ice_ flx924 1113 END SUBROUTINE blk_ice_2 1114 925 1115 926 1116 SUBROUTINE blk_ice_qcn( ld_virtual_itd, ptsu, ptb, phs, phi ) … … 931 1121 !! to force sea ice / snow thermodynamics 932 1122 !! in the case conduction flux is emulated 933 !! 1123 !! 934 1124 !! ** Method : compute surface energy balance assuming neglecting heat storage 935 1125 !! following the 0-layer Semtner (1976) approach … … 956 1146 REAL(wp), DIMENSION(jpi,jpj,jpl) :: zgfac ! enhanced conduction factor 957 1147 !!--------------------------------------------------------------------- 958 1148 959 1149 ! -------------------------------------! 960 1150 ! I Enhanced conduction factor ! … … 964 1154 ! 965 1155 zgfac(:,:,:) = 1._wp 966 1156 967 1157 IF( ld_virtual_itd ) THEN 968 1158 ! … … 970 1160 zfac2 = EXP(1._wp) * 0.5_wp * zepsilon 971 1161 zfac3 = 2._wp / zepsilon 972 ! 973 DO jl = 1, jpl 1162 ! 1163 DO jl = 1, jpl 974 1164 DO jj = 1 , jpj 975 1165 DO ji = 1, jpi … … 979 1169 END DO 980 1170 END DO 981 ! 982 ENDIF 983 1171 ! 1172 ENDIF 1173 984 1174 ! -------------------------------------------------------------! 985 1175 ! II Surface temperature and conduction flux ! … … 991 1181 DO jj = 1 , jpj 992 1182 DO ji = 1, jpi 993 ! 1183 ! 994 1184 zkeff_h = zfac * zgfac(ji,jj,jl) / & ! Effective conductivity of the snow-ice system divided by thickness 995 1185 & ( rcnd_i * phs(ji,jj,jl) + rn_cnd_s * MAX( 0.01, phi(ji,jj,jl) ) ) … … 1008 1198 qns_ice(ji,jj,jl) = qns_ice(ji,jj,jl) + dqns_ice(ji,jj,jl) * ( ptsu(ji,jj,jl) - ztsu0 ) 1009 1199 qml_ice(ji,jj,jl) = ( qsr_ice(ji,jj,jl) - qtr_ice_top(ji,jj,jl) + qns_ice(ji,jj,jl) - qcn_ice(ji,jj,jl) ) & 1010 1200 & * MAX( 0._wp , SIGN( 1._wp, ptsu(ji,jj,jl) - rt0 ) ) 1011 1201 1012 1202 ! --- Diagnose the heat loss due to changing non-solar flux (as in icethd_zdf_bl99) --- ! 1013 hfx_err_dif(ji,jj) = hfx_err_dif(ji,jj) - ( dqns_ice(ji,jj,jl) * ( ptsu(ji,jj,jl) - ztsu0 ) ) * a_i_b(ji,jj,jl) 1203 hfx_err_dif(ji,jj) = hfx_err_dif(ji,jj) - ( dqns_ice(ji,jj,jl) * ( ptsu(ji,jj,jl) - ztsu0 ) ) * a_i_b(ji,jj,jl) 1014 1204 1015 1205 END DO 1016 1206 END DO 1017 1207 ! 1018 END DO 1019 ! 1208 END DO 1209 ! 1020 1210 END SUBROUTINE blk_ice_qcn 1021 1022 1023 SUBROUTINE Cdn10_Lupkes2012( Cd )1211 1212 1213 SUBROUTINE Cdn10_Lupkes2012( pcd ) 1024 1214 !!---------------------------------------------------------------------- 1025 1215 !! *** ROUTINE Cdn10_Lupkes2012 *** 1026 1216 !! 1027 !! ** Purpose : Recompute the neutral air-ice drag referenced at 10m 1217 !! ** Purpose : Recompute the neutral air-ice drag referenced at 10m 1028 1218 !! to make it dependent on edges at leads, melt ponds and flows. 1029 1219 !! After some approximations, this can be resumed to a dependency 1030 1220 !! on ice concentration. 1031 !! 1221 !! 1032 1222 !! ** Method : The parameterization is taken from Lupkes et al. (2012) eq.(50) 1033 1223 !! with the highest level of approximation: level4, eq.(59) … … 1041 1231 !! 1042 1232 !! This new drag has a parabolic shape (as a function of A) starting at 1043 !! Cdw(say 1.5e-3) for A=0, reaching 1.97e-3 for A~0.5 1233 !! Cdw(say 1.5e-3) for A=0, reaching 1.97e-3 for A~0.5 1044 1234 !! and going down to Cdi(say 1.4e-3) for A=1 1045 1235 !! … … 1051 1241 !! 1052 1242 !!---------------------------------------------------------------------- 1053 REAL(wp), DIMENSION(:,:), INTENT(inout) :: Cd1243 REAL(wp), DIMENSION(:,:), INTENT(inout) :: pcd 1054 1244 REAL(wp), PARAMETER :: zCe = 2.23e-03_wp 1055 1245 REAL(wp), PARAMETER :: znu = 1._wp … … 1066 1256 1067 1257 ! ice-atm drag 1068 Cd(:,:) =Cd_ice + & ! pure ice drag1069 & zCe * ( 1._wp - at_i_b(:,:) )**zcoef * at_i_b(:,:)**(zmu-1._wp) ! change due to sea-ice morphology1070 1258 pcd(:,:) = rCd_ice + & ! pure ice drag 1259 & zCe * ( 1._wp - at_i_b(:,:) )**zcoef * at_i_b(:,:)**(zmu-1._wp) ! change due to sea-ice morphology 1260 1071 1261 END SUBROUTINE Cdn10_Lupkes2012 1072 1262 1073 1263 1074 SUBROUTINE Cdn10_Lupkes2015( Cd, Ch )1264 SUBROUTINE Cdn10_Lupkes2015( ptm_su, pslp, pcd, pch ) 1075 1265 !!---------------------------------------------------------------------- 1076 1266 !! *** ROUTINE Cdn10_Lupkes2015 *** 1077 1267 !! 1078 1268 !! ** pUrpose : Alternative turbulent transfert coefficients formulation 1079 !! between sea-ice and atmosphere with distinct momentum 1080 !! and heat coefficients depending on sea-ice concentration 1269 !! between sea-ice and atmosphere with distinct momentum 1270 !! and heat coefficients depending on sea-ice concentration 1081 1271 !! and atmospheric stability (no meltponds effect for now). 1082 !! 1272 !! 1083 1273 !! ** Method : The parameterization is adapted from Lupkes et al. (2015) 1084 1274 !! and ECHAM6 atmospheric model. Compared to Lupkes2012 scheme, 1085 1275 !! it considers specific skin and form drags (Andreas et al. 2010) 1086 !! to compute neutral transfert coefficients for both heat and 1276 !! to compute neutral transfert coefficients for both heat and 1087 1277 !! momemtum fluxes. Atmospheric stability effect on transfert 1088 1278 !! coefficient is also taken into account following Louis (1979). … … 1093 1283 !!---------------------------------------------------------------------- 1094 1284 ! 1095 REAL(wp), DIMENSION(:,:), INTENT(inout) :: Cd 1096 REAL(wp), DIMENSION(:,:), INTENT(inout) :: Ch 1097 REAL(wp), DIMENSION(jpi,jpj) :: ztm_su, zst, zqo_sat, zqi_sat 1285 REAL(wp), DIMENSION(:,:), INTENT(in ) :: ptm_su ! sea-ice surface temperature [K] 1286 REAL(wp), DIMENSION(:,:), INTENT(in ) :: pslp ! sea-level pressure [Pa] 1287 REAL(wp), DIMENSION(:,:), INTENT(inout) :: pcd ! momentum transfert coefficient 1288 REAL(wp), DIMENSION(:,:), INTENT(inout) :: pch ! heat transfert coefficient 1289 REAL(wp), DIMENSION(jpi,jpj) :: zst, zqo_sat, zqi_sat 1098 1290 ! 1099 1291 ! ECHAM6 constants … … 1123 1315 !!---------------------------------------------------------------------- 1124 1316 1125 ! mean temperature1126 WHERE( at_i_b(:,:) > 1.e-20 ) ; ztm_su(:,:) = SUM( t_su(:,:,:) * a_i_b(:,:,:) , dim=3 ) / at_i_b(:,:)1127 ELSEWHERE ; ztm_su(:,:) = rt01128 ENDWHERE1129 1130 1317 ! Momentum Neutral Transfert Coefficients (should be a constant) 1131 1318 zCdn_form_tmp = zce10 * ( LOG( 10._wp / z0_form_ice + 1._wp ) / LOG( rn_zu / z0_form_ice + 1._wp ) )**2 ! Eq. 40 1132 1319 zCdn_skin_ice = ( vkarmn / LOG( rn_zu / z0_skin_ice + 1._wp ) )**2 ! Eq. 7 1133 zCdn_ice = zCdn_skin_ice ! Eq. 7 (cf Lupkes email for details)1320 zCdn_ice = zCdn_skin_ice ! Eq. 7 1134 1321 !zCdn_ice = 1.89e-3 ! old ECHAM5 value (cf Eq. 32) 1135 1322 1136 1323 ! Heat Neutral Transfert Coefficients 1137 zChn_skin_ice = vkarmn**2 / ( LOG( rn_zu / z0_ice + 1._wp ) * LOG( rn_zu * z1_alpha / z0_skin_ice + 1._wp ) ) ! Eq. 50 + Eq. 52 (cf Lupkes email for details)1138 1324 zChn_skin_ice = vkarmn**2 / ( LOG( rn_zu / z0_ice + 1._wp ) * LOG( rn_zu * z1_alpha / z0_skin_ice + 1._wp ) ) ! Eq. 50 + Eq. 52 1325 1139 1326 ! Atmospheric and Surface Variables 1140 1327 zst(:,:) = sst_m(:,:) + rt0 ! convert SST from Celcius to Kelvin 1141 zqo_sat(:,:) = 0.98_wp * q_sat( zst(:,:) , sf(jp_slp)%fnow(:,:,1) )! saturation humidity over ocean [kg/kg]1142 zqi_sat(:,:) = 0.98_wp * q_sat( ztm_su(:,:), sf(jp_slp)%fnow(:,:,1) )! saturation humidity over ice [kg/kg]1328 zqo_sat(:,:) = rdct_qsat_salt * q_sat( zst(:,:) , pslp(:,:) ) ! saturation humidity over ocean [kg/kg] 1329 zqi_sat(:,:) = q_sat( ptm_su(:,:), pslp(:,:) ) ! saturation humidity over ice [kg/kg] 1143 1330 ! 1144 1331 DO jj = 2, jpjm1 ! reduced loop is necessary for reproducibility … … 1146 1333 ! Virtual potential temperature [K] 1147 1334 zthetav_os = zst(ji,jj) * ( 1._wp + rctv0 * zqo_sat(ji,jj) ) ! over ocean 1148 zthetav_is = ztm_su(ji,jj) * ( 1._wp + rctv0 * zqi_sat(ji,jj) ) ! ocean ice1335 zthetav_is = ptm_su(ji,jj) * ( 1._wp + rctv0 * zqi_sat(ji,jj) ) ! ocean ice 1149 1336 zthetav_zu = t_zu (ji,jj) * ( 1._wp + rctv0 * q_zu(ji,jj) ) ! at zu 1150 1337 1151 1338 ! Bulk Richardson Number (could use Ri_bulk function from aerobulk instead) 1152 1339 zrib_o = grav / zthetav_os * ( zthetav_zu - zthetav_os ) * rn_zu / MAX( 0.5, wndm(ji,jj) )**2 ! over ocean 1153 1340 zrib_i = grav / zthetav_is * ( zthetav_zu - zthetav_is ) * rn_zu / MAX( 0.5, wndm_ice(ji,jj) )**2 ! over ice 1154 1341 1155 1342 ! Momentum and Heat Neutral Transfert Coefficients 1156 1343 zCdn_form_ice = zCdn_form_tmp * at_i_b(ji,jj) * ( 1._wp - at_i_b(ji,jj) )**zbeta ! Eq. 40 1157 zChn_form_ice = zCdn_form_ice / ( 1._wp + ( LOG( z1_alphaf ) / vkarmn ) * SQRT( zCdn_form_ice ) ) ! Eq. 53 1158 1159 ! Momentum and Heat Stability functions (possibility to use psi_m_ecmwf instead )1344 zChn_form_ice = zCdn_form_ice / ( 1._wp + ( LOG( z1_alphaf ) / vkarmn ) * SQRT( zCdn_form_ice ) ) ! Eq. 53 1345 1346 ! Momentum and Heat Stability functions (possibility to use psi_m_ecmwf instead ?) 1160 1347 z0w = rn_zu * EXP( -1._wp * vkarmn / SQRT( Cdn_oce(ji,jj) ) ) ! over water 1161 z0i = z0_skin_ice ! over ice (cf Lupkes email for details)1348 z0i = z0_skin_ice ! over ice 1162 1349 IF( zrib_o <= 0._wp ) THEN 1163 1350 zfmw = 1._wp - zam * zrib_o / ( 1._wp + 3._wp * zc2 * Cdn_oce(ji,jj) * SQRT( -zrib_o * ( rn_zu / z0w + 1._wp ) ) ) ! Eq. 10 … … 1168 1355 zfhw = 1._wp / ( 1._wp + zah * zrib_o / SQRT( 1._wp + zrib_o ) ) ! Eq. 28 1169 1356 ENDIF 1170 1357 1171 1358 IF( zrib_i <= 0._wp ) THEN 1172 1359 zfmi = 1._wp - zam * zrib_i / (1._wp + 3._wp * zc2 * zCdn_ice * SQRT( -zrib_i * ( rn_zu / z0i + 1._wp))) ! Eq. 9 … … 1176 1363 zfhi = 1._wp / ( 1._wp + zah * zrib_i / SQRT( 1._wp + zrib_i ) ) ! Eq. 27 1177 1364 ENDIF 1178 1365 1179 1366 ! Momentum Transfert Coefficients (Eq. 38) 1180 Cd(ji,jj) = zCdn_skin_ice * zfmi + &1367 pcd(ji,jj) = zCdn_skin_ice * zfmi + & 1181 1368 & zCdn_form_ice * ( zfmi * at_i_b(ji,jj) + zfmw * ( 1._wp - at_i_b(ji,jj) ) ) / MAX( 1.e-06, at_i_b(ji,jj) ) 1182 1369 1183 1370 ! Heat Transfert Coefficients (Eq. 49) 1184 Ch(ji,jj) = zChn_skin_ice * zfhi + &1371 pch(ji,jj) = zChn_skin_ice * zfhi + & 1185 1372 & zChn_form_ice * ( zfhi * at_i_b(ji,jj) + zfhw * ( 1._wp - at_i_b(ji,jj) ) ) / MAX( 1.e-06, at_i_b(ji,jj) ) 1186 1373 ! 1187 1374 END DO 1188 1375 END DO 1189 CALL lbc_lnk_multi( 'sbcblk', Cd, 'T', 1., Ch, 'T', 1. )1376 CALL lbc_lnk_multi( 'sbcblk', pcd, 'T', 1., pch, 'T', 1. ) 1190 1377 ! 1191 1378 END SUBROUTINE Cdn10_Lupkes2015 -
NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/SBC/sbcblk_algo_ecmwf.F90
r10069 r12182 1 1 MODULE sbcblk_algo_ecmwf 2 2 !!====================================================================== 3 !! *** MODULE sbcblk_algo_ecmwf *** 4 !! Computes turbulent components of surface fluxes 5 !! according to the method in IFS of the ECMWF model 6 !! 3 !! *** MODULE sbcblk_algo_ecmwf *** 4 !! Computes: 7 5 !! * bulk transfer coefficients C_D, C_E and C_H 8 6 !! * air temp. and spec. hum. adjusted from zt (2m) to zu (10m) if needed … … 10 8 !! => all these are used in bulk formulas in sbcblk.F90 11 9 !! 12 !! Using the bulk formulation/param. of IFS of ECMWF (cycle 31r2)10 !! Using the bulk formulation/param. of IFS of ECMWF (cycle 40r1) 13 11 !! based on IFS doc (avaible online on the ECMWF's website) 14 12 !! 13 !! Routine turb_ecmwf maintained and developed in AeroBulk 14 !! (https://github.com/brodeau/aerobulk) 15 15 !! 16 !! Routine turb_ecmwf maintained and developed in AeroBulk 17 !! (http://aerobulk.sourceforge.net/) 18 !! 19 !! ** Author: L. Brodeau, june 2016 / AeroBulk (https://sourceforge.net/p/aerobulk) 16 !! ** Author: L. Brodeau, June 2019 / AeroBulk (https://github.com/brodeau/aerobulk) 20 17 !!---------------------------------------------------------------------- 21 18 !! History : 4.0 ! 2016-02 (L.Brodeau) Original code … … 41 38 42 39 USE sbc_oce ! Surface boundary condition: ocean fields 40 USE sbcblk_phy ! all thermodynamics functions, rho_air, q_sat, etc... !LB 41 USE sbcblk_skin_ecmwf ! cool-skin/warm layer scheme !LB 43 42 44 43 IMPLICIT NONE 45 44 PRIVATE 46 45 47 PUBLIC :: TURB_ECMWF ! called by sbcblk.F9048 49 ! !! ECMWF own values for given constants, taken form IFS documentation...46 PUBLIC :: SBCBLK_ALGO_ECMWF_INIT, TURB_ECMWF 47 48 !! ECMWF own values for given constants, taken form IFS documentation... 50 49 REAL(wp), PARAMETER :: charn0 = 0.018 ! Charnock constant (pretty high value here !!! 51 50 ! ! => Usually 0.011 for moderate winds) 52 51 REAL(wp), PARAMETER :: zi0 = 1000. ! scale height of the atmospheric boundary layer...1 53 52 REAL(wp), PARAMETER :: Beta0 = 1. ! gustiness parameter ( = 1.25 in COAREv3) 54 REAL(wp), PARAMETER :: rctv0 = 0.608 ! constant to obtain virtual temperature...55 REAL(wp), PARAMETER :: Cp_dry = 1005.0 ! Specic heat of dry air, constant pressure [J/K/kg]56 REAL(wp), PARAMETER :: Cp_vap = 1860.0 ! Specic heat of water vapor, constant pressure [J/K/kg]57 53 REAL(wp), PARAMETER :: alpha_M = 0.11 ! For roughness length (smooth surface term) 58 54 REAL(wp), PARAMETER :: alpha_H = 0.40 ! (Chapter 3, p.34, IFS doc Cy31r1) 59 55 REAL(wp), PARAMETER :: alpha_Q = 0.62 ! 56 57 INTEGER , PARAMETER :: nb_itt = 10 ! number of itterations 58 60 59 !!---------------------------------------------------------------------- 61 60 CONTAINS 62 61 63 SUBROUTINE TURB_ECMWF( zt, zu, sst, t_zt, ssq , q_zt , U_zu, & 64 & Cd, Ch, Ce , t_zu, q_zu, U_blk, & 65 & Cdn, Chn, Cen ) 66 !!---------------------------------------------------------------------------------- 67 !! *** ROUTINE turb_ecmwf *** 68 !! 69 !! 2015: L. Brodeau (brodeau@gmail.com) 70 !! 71 !! ** Purpose : Computes turbulent transfert coefficients of surface 72 !! fluxes according to IFS doc. (cycle 31) 73 !! If relevant (zt /= zu), adjust temperature and humidity from height zt to zu 74 !! 75 !! ** Method : Monin Obukhov Similarity Theory 62 63 SUBROUTINE sbcblk_algo_ecmwf_init(l_use_cs, l_use_wl) 64 !!--------------------------------------------------------------------- 65 !! *** FUNCTION sbcblk_algo_ecmwf_init *** 76 66 !! 77 67 !! INPUT : 78 68 !! ------- 69 !! * l_use_cs : use the cool-skin parameterization 70 !! * l_use_wl : use the warm-layer parameterization 71 !!--------------------------------------------------------------------- 72 LOGICAL , INTENT(in) :: l_use_cs ! use the cool-skin parameterization 73 LOGICAL , INTENT(in) :: l_use_wl ! use the warm-layer parameterization 74 INTEGER :: ierr 75 !!--------------------------------------------------------------------- 76 IF( l_use_wl ) THEN 77 ierr = 0 78 ALLOCATE ( dT_wl(jpi,jpj), Hz_wl(jpi,jpj), STAT=ierr ) 79 IF( ierr > 0 ) CALL ctl_stop( ' SBCBLK_ALGO_ECMWF_INIT => allocation of dT_wl & Hz_wl failed!' ) 80 dT_wl(:,:) = 0._wp 81 Hz_wl(:,:) = rd0 ! (rd0, constant, = 3m is default for Zeng & Beljaars) 82 ENDIF 83 IF( l_use_cs ) THEN 84 ierr = 0 85 ALLOCATE ( dT_cs(jpi,jpj), STAT=ierr ) 86 IF( ierr > 0 ) CALL ctl_stop( ' SBCBLK_ALGO_ECMWF_INIT => allocation of dT_cs failed!' ) 87 dT_cs(:,:) = -0.25_wp ! First guess of skin correction 88 ENDIF 89 END SUBROUTINE sbcblk_algo_ecmwf_init 90 91 92 93 SUBROUTINE turb_ecmwf( kt, zt, zu, T_s, t_zt, q_s, q_zt, U_zu, l_use_cs, l_use_wl, & 94 & Cd, Ch, Ce, t_zu, q_zu, U_blk, & 95 & Cdn, Chn, Cen, & 96 & Qsw, rad_lw, slp, pdT_cs, & ! optionals for cool-skin (and warm-layer) 97 & pdT_wl, pHz_wl ) ! optionals for warm-layer only 98 !!---------------------------------------------------------------------- 99 !! *** ROUTINE turb_ecmwf *** 100 !! 101 !! ** Purpose : Computes turbulent transfert coefficients of surface 102 !! fluxes according to IFS doc. (cycle 45r1) 103 !! If relevant (zt /= zu), adjust temperature and humidity from height zt to zu 104 !! Returns the effective bulk wind speed at zu to be used in the bulk formulas 105 !! 106 !! Applies the cool-skin warm-layer correction of the SST to T_s 107 !! if the net shortwave flux at the surface (Qsw), the downwelling longwave 108 !! radiative fluxes at the surface (rad_lw), and the sea-leve pressure (slp) 109 !! are provided as (optional) arguments! 110 !! 111 !! INPUT : 112 !! ------- 113 !! * kt : current time step (starts at 1) 79 114 !! * zt : height for temperature and spec. hum. of air [m] 80 !! * zu : height for wind speed (generally 10m) [m] 81 !! * U_zu : scalar wind speed at 10m [m/s] 82 !! * sst : SST [K] 115 !! * zu : height for wind speed (usually 10m) [m] 83 116 !! * t_zt : potential air temperature at zt [K] 84 !! * ssq : specific humidity at saturation at SST [kg/kg]85 117 !! * q_zt : specific humidity of air at zt [kg/kg] 86 !! 118 !! * U_zu : scalar wind speed at zu [m/s] 119 !! * l_use_cs : use the cool-skin parameterization 120 !! * l_use_wl : use the warm-layer parameterization 121 !! 122 !! INPUT/OUTPUT: 123 !! ------------- 124 !! * T_s : always "bulk SST" as input [K] 125 !! -> unchanged "bulk SST" as output if CSWL not used [K] 126 !! -> skin temperature as output if CSWL used [K] 127 !! 128 !! * q_s : SSQ aka saturation specific humidity at temp. T_s [kg/kg] 129 !! -> doesn't need to be given a value if skin temp computed (in case l_use_cs=True or l_use_wl=True) 130 !! -> MUST be given the correct value if not computing skint temp. (in case l_use_cs=False or l_use_wl=False) 131 !! 132 !! OPTIONAL INPUT: 133 !! --------------- 134 !! * Qsw : net solar flux (after albedo) at the surface (>0) [W/m^2] 135 !! * rad_lw : downwelling longwave radiation at the surface (>0) [W/m^2] 136 !! * slp : sea-level pressure [Pa] 137 !! 138 !! OPTIONAL OUTPUT: 139 !! ---------------- 140 !! * pdT_cs : SST increment "dT" for cool-skin correction [K] 141 !! * pdT_wl : SST increment "dT" for warm-layer correction [K] 142 !! * pHz_wl : thickness of warm-layer [m] 87 143 !! 88 144 !! OUTPUT : … … 93 149 !! * t_zu : pot. air temperature adjusted at wind height zu [K] 94 150 !! * q_zu : specific humidity of air // [kg/kg] 95 !! * U_blk : bulk wind at 10m [m/s] 96 !! 97 !! 98 !! ** Author: L. Brodeau, june 2016 / AeroBulk (https://sourceforge.net/p/aerobulk) 99 !!---------------------------------------------------------------------------------- 151 !! * U_blk : bulk wind speed at zu [m/s] 152 !! 153 !! 154 !! ** Author: L. Brodeau, June 2019 / AeroBulk (https://github.com/brodeau/aerobulk/) 155 !!---------------------------------------------------------------------------------- 156 INTEGER, INTENT(in ) :: kt ! current time step 100 157 REAL(wp), INTENT(in ) :: zt ! height for t_zt and q_zt [m] 101 158 REAL(wp), INTENT(in ) :: zu ! height for U_zu [m] 102 REAL(wp), INTENT(in ), DIMENSION(jpi,jpj) :: sst! sea surface temperature [Kelvin]159 REAL(wp), INTENT(inout), DIMENSION(jpi,jpj) :: T_s ! sea surface temperature [Kelvin] 103 160 REAL(wp), INTENT(in ), DIMENSION(jpi,jpj) :: t_zt ! potential air temperature [Kelvin] 104 REAL(wp), INTENT(in ), DIMENSION(jpi,jpj) :: ssq! sea surface specific humidity [kg/kg]105 REAL(wp), INTENT(in ), DIMENSION(jpi,jpj) :: q_zt ! specific air humidity 161 REAL(wp), INTENT(inout), DIMENSION(jpi,jpj) :: q_s ! sea surface specific humidity [kg/kg] 162 REAL(wp), INTENT(in ), DIMENSION(jpi,jpj) :: q_zt ! specific air humidity at zt [kg/kg] 106 163 REAL(wp), INTENT(in ), DIMENSION(jpi,jpj) :: U_zu ! relative wind module at zu [m/s] 164 LOGICAL , INTENT(in ) :: l_use_cs ! use the cool-skin parameterization 165 LOGICAL , INTENT(in ) :: l_use_wl ! use the warm-layer parameterization 107 166 REAL(wp), INTENT( out), DIMENSION(jpi,jpj) :: Cd ! transfer coefficient for momentum (tau) 108 167 REAL(wp), INTENT( out), DIMENSION(jpi,jpj) :: Ch ! transfer coefficient for sensible heat (Q_sens) … … 110 169 REAL(wp), INTENT( out), DIMENSION(jpi,jpj) :: t_zu ! pot. air temp. adjusted at zu [K] 111 170 REAL(wp), INTENT( out), DIMENSION(jpi,jpj) :: q_zu ! spec. humidity adjusted at zu [kg/kg] 112 REAL(wp), INTENT( out), DIMENSION(jpi,jpj) :: U_blk ! bulk wind at 10m[m/s]171 REAL(wp), INTENT( out), DIMENSION(jpi,jpj) :: U_blk ! bulk wind speed at zu [m/s] 113 172 REAL(wp), INTENT( out), DIMENSION(jpi,jpj) :: Cdn, Chn, Cen ! neutral transfer coefficients 114 173 ! 174 REAL(wp), INTENT(in ), OPTIONAL, DIMENSION(jpi,jpj) :: Qsw ! [W/m^2] 175 REAL(wp), INTENT(in ), OPTIONAL, DIMENSION(jpi,jpj) :: rad_lw ! [W/m^2] 176 REAL(wp), INTENT(in ), OPTIONAL, DIMENSION(jpi,jpj) :: slp ! [Pa] 177 REAL(wp), INTENT( out), OPTIONAL, DIMENSION(jpi,jpj) :: pdT_cs 178 REAL(wp), INTENT( out), OPTIONAL, DIMENSION(jpi,jpj) :: pdT_wl ! [K] 179 REAL(wp), INTENT( out), OPTIONAL, DIMENSION(jpi,jpj) :: pHz_wl ! [m] 180 ! 115 181 INTEGER :: j_itt 116 LOGICAL :: l_zt_equal_zu = .FALSE. ! if q and t are given at same height as U 117 INTEGER , PARAMETER :: nb_itt = 4 ! number of itterations 118 ! 119 REAL(wp), DIMENSION(jpi,jpj) :: u_star, t_star, q_star, & 120 & dt_zu, dq_zu, & 121 & znu_a, & !: Nu_air, Viscosity of air 122 & Linv, & !: 1/L (inverse of Monin Obukhov length... 123 & z0, z0t, z0q 124 REAL(wp), DIMENSION(jpi,jpj) :: func_m, func_h 125 REAL(wp), DIMENSION(jpi,jpj) :: ztmp0, ztmp1, ztmp2 126 !!---------------------------------------------------------------------------------- 127 ! 128 ! Identical first gess as in COARE, with IFS parameter values though 129 ! 182 LOGICAL :: l_zt_equal_zu = .FALSE. ! if q and t are given at same height as U 183 ! 184 REAL(wp), DIMENSION(jpi,jpj) :: u_star, t_star, q_star 185 REAL(wp), DIMENSION(jpi,jpj) :: dt_zu, dq_zu 186 REAL(wp), DIMENSION(jpi,jpj) :: znu_a !: Nu_air, Viscosity of air 187 REAL(wp), DIMENSION(jpi,jpj) :: Linv !: 1/L (inverse of Monin Obukhov length... 188 REAL(wp), DIMENSION(jpi,jpj) :: z0, z0t, z0q 189 ! 190 REAL(wp), DIMENSION(:,:), ALLOCATABLE :: zsst ! to back up the initial bulk SST 191 ! 192 REAL(wp), DIMENSION(jpi,jpj) :: func_m, func_h 193 REAL(wp), DIMENSION(jpi,jpj) :: ztmp0, ztmp1, ztmp2 194 CHARACTER(len=40), PARAMETER :: crtnm = 'turb_ecmwf@sbcblk_algo_ecmwf.F90' 195 !!---------------------------------------------------------------------------------- 196 197 IF( kt == nit000 ) CALL SBCBLK_ALGO_ECMWF_INIT(l_use_cs, l_use_wl) 198 130 199 l_zt_equal_zu = .FALSE. 131 IF( ABS(zu - zt) < 0.01 ) l_zt_equal_zu = .TRUE. ! testing "zu == zt" is risky with double precision 132 133 200 IF( ABS(zu - zt) < 0.01_wp ) l_zt_equal_zu = .TRUE. ! testing "zu == zt" is risky with double precision 201 202 !! Initializations for cool skin and warm layer: 203 IF( l_use_cs .AND. (.NOT.(PRESENT(Qsw) .AND. PRESENT(rad_lw) .AND. PRESENT(slp))) ) & 204 & CALL ctl_stop( '['//TRIM(crtnm)//'] => ' , 'you need to provide Qsw, rad_lw & slp to use cool-skin param!' ) 205 206 IF( l_use_wl .AND. (.NOT.(PRESENT(Qsw) .AND. PRESENT(rad_lw) .AND. PRESENT(slp))) ) & 207 & CALL ctl_stop( '['//TRIM(crtnm)//'] => ' , 'you need to provide Qsw, rad_lw & slp to use warm-layer param!' ) 208 209 IF( l_use_cs .OR. l_use_wl ) THEN 210 ALLOCATE ( zsst(jpi,jpj) ) 211 zsst = T_s ! backing up the bulk SST 212 IF( l_use_cs ) T_s = T_s - 0.25_wp ! First guess of correction 213 q_s = rdct_qsat_salt*q_sat(MAX(T_s, 200._wp), slp) ! First guess of q_s 214 ENDIF 215 216 217 ! Identical first gess as in COARE, with IFS parameter values though... 218 ! 134 219 !! First guess of temperature and humidity at height zu: 135 t_zu = MAX( t_zt , 0.0) ! who knows what's given on masked-continental regions...136 q_zu = MAX( q_zt , 1.e-6 ) ! "220 t_zu = MAX( t_zt , 180._wp ) ! who knows what's given on masked-continental regions... 221 q_zu = MAX( q_zt , 1.e-6_wp ) ! " 137 222 138 223 !! Pot. temp. difference (and we don't want it to be 0!) 139 dt_zu = t_zu - sst ; dt_zu = SIGN( MAX(ABS(dt_zu),1.e-6), dt_zu )140 dq_zu = q_zu - ssq ; dq_zu = SIGN( MAX(ABS(dq_zu),1.e-9), dq_zu )141 142 znu_a = visc_air(t_z t) ! Air viscosity (m^2/s) at zt given from temperature in (K)143 144 ztmp2 = 0.5 * 0.5! initial guess for wind gustiness contribution145 U_blk = SQRT(U_zu*U_zu + ztmp2) 146 147 ! z0 = 0.0001148 ztmp2 = 10000. ! optimization: ztmp2 == 1/z0149 ztmp0 = LOG(zu*ztmp2) 150 z tmp1 = LOG(10.*ztmp2)151 u_star = 0.035*U_blk*ztmp1/ztmp0 ! (u* = 0.035*Un10)152 153 z0 = charn0*u_star*u_star/grav + 0.11*znu_a/u_star154 z0t = 0.1*EXP(vkarmn/(0.00115/(vkarmn/ztmp1))) ! WARNING: 1/z0t !224 dt_zu = t_zu - T_s ; dt_zu = SIGN( MAX(ABS(dt_zu),1.E-6_wp), dt_zu ) 225 dq_zu = q_zu - q_s ; dq_zu = SIGN( MAX(ABS(dq_zu),1.E-9_wp), dq_zu ) 226 227 znu_a = visc_air(t_zu) ! Air viscosity (m^2/s) at zt given from temperature in (K) 228 229 U_blk = SQRT(U_zu*U_zu + 0.5_wp*0.5_wp) ! initial guess for wind gustiness contribution 230 231 ztmp0 = LOG( zu*10000._wp) ! optimization: 10000. == 1/z0 (with z0 first guess == 0.0001) 232 ztmp1 = LOG(10._wp*10000._wp) ! " " " 233 u_star = 0.035_wp*U_blk*ztmp1/ztmp0 ! (u* = 0.035*Un10) 234 235 z0 = charn0*u_star*u_star/grav + 0.11_wp*znu_a/u_star 236 z0 = MIN( MAX(ABS(z0), 1.E-9) , 1._wp ) ! (prevents FPE from stupid values from masked region later on) 237 238 z0t = 1._wp / ( 0.1_wp*EXP(vkarmn/(0.00115/(vkarmn/ztmp1))) ) 239 z0t = MIN( MAX(ABS(z0t), 1.E-9) , 1._wp ) ! (prevents FPE from stupid values from masked region later on) 155 240 156 241 Cd = (vkarmn/ztmp0)**2 ! first guess of Cd 157 242 158 ztmp0 = vkarmn*vkarmn/LOG(zt *z0t)/Cd159 160 ztmp2 = Ri_bulk( zu, t_zu, dt_zu, q_zu, dq_zu, U_blk ) ! Ribu = Bulk Richardson number161 162 !! First estimate of zeta_u, depending on the stability, ie sign of Ribu(ztmp2):163 ztmp1 = 0.5 + SIGN( 0.5 , ztmp2 )243 ztmp0 = vkarmn*vkarmn/LOG(zt/z0t)/Cd 244 245 ztmp2 = Ri_bulk( zu, T_s, t_zu, q_s, q_zu, U_blk ) ! Bulk Richardson Number (BRN) 246 247 !! First estimate of zeta_u, depending on the stability, ie sign of BRN (ztmp2): 248 ztmp1 = 0.5 + SIGN( 0.5_wp , ztmp2 ) 164 249 func_m = ztmp0*ztmp2 ! temporary array !! 165 !! Ribu < 0 Ribu > 0 Beta = 1.25166 func_h = (1.-ztmp1)*(func_m/(1.+ztmp2/(-zu/(zi0*0.004*Beta0**3)))) & ! temporary array !!! func_h == zeta_u167 & + ztmp1*(func_m*(1. + 27./9.*ztmp2/ztmp0))250 func_h = (1._wp-ztmp1) * (func_m/(1._wp+ztmp2/(-zu/(zi0*0.004_wp*Beta0**3)))) & ! BRN < 0 ! temporary array !!! func_h == zeta_u 251 & + ztmp1 * (func_m*(1._wp + 27._wp/9._wp*ztmp2/func_m)) ! BRN > 0 252 !#LB: should make sure that the "func_m" of "27./9.*ztmp2/func_m" is "ztmp0*ztmp2" and not "ztmp0==vkarmn*vkarmn/LOG(zt/z0t)/Cd" ! 168 253 169 254 !! First guess M-O stability dependent scaling params.(u*,t*,q*) to estimate z0 and z/L 170 ztmp0 = vkarmn/(LOG(zu*z0t) - psi_h_ecmwf(func_h))171 172 u_star = U_blk*vkarmn/(LOG(zu) - LOG(z0) - psi_m_ecmwf(func_h))255 ztmp0 = vkarmn/(LOG(zu/z0t) - psi_h_ecmwf(func_h)) 256 257 u_star = MAX ( U_blk*vkarmn/(LOG(zu) - LOG(z0) - psi_m_ecmwf(func_h)) , 1.E-9 ) ! (MAX => prevents FPE from stupid values from masked region later on) 173 258 t_star = dt_zu*ztmp0 174 259 q_star = dq_zu*ztmp0 175 260 176 ! What 's needto be done if zt /= zu:261 ! What needs to be done if zt /= zu: 177 262 IF( .NOT. l_zt_equal_zu ) THEN 178 !179 263 !! First update of values at zu (or zt for wind) 180 264 ztmp0 = psi_h_ecmwf(func_h) - psi_h_ecmwf(zt*func_h/zu) ! zt*func_h/zu == zeta_t 181 ztmp1 = log(zt/zu) + ztmp0265 ztmp1 = LOG(zt/zu) + ztmp0 182 266 t_zu = t_zt - t_star/vkarmn*ztmp1 183 267 q_zu = q_zt - q_star/vkarmn*ztmp1 184 q_zu = (0.5 + sign(0.5,q_zu))*q_zu !Makes it impossible to have negative humidity : 185 186 dt_zu = t_zu - sst ; dt_zu = SIGN( MAX(ABS(dt_zu),1.E-6), dt_zu ) 187 dq_zu = q_zu - ssq ; dq_zu = SIGN( MAX(ABS(dq_zu),1.E-9), dq_zu ) 268 q_zu = (0.5_wp + SIGN(0.5_wp,q_zu))*q_zu !Makes it impossible to have negative humidity : 188 269 ! 270 dt_zu = t_zu - T_s ; dt_zu = SIGN( MAX(ABS(dt_zu),1.E-6_wp), dt_zu ) 271 dq_zu = q_zu - q_s ; dq_zu = SIGN( MAX(ABS(dq_zu),1.E-9_wp), dq_zu ) 189 272 ENDIF 190 273 … … 194 277 195 278 !! First guess of inverse of Monin-Obukov length (1/L) : 196 ztmp0 = (1. + rctv0*q_zu) ! the factor to apply to temp. to get virt. temp... 197 Linv = grav*vkarmn*(t_star*ztmp0 + rctv0*t_zu*q_star) / ( u_star*u_star * t_zu*ztmp0 ) 279 Linv = One_on_L( t_zu, q_zu, u_star, t_star, q_star ) 198 280 199 281 !! Functions such as u* = U_blk*vkarmn/func_m 200 ztmp1 = zu + z0 201 ztmp0 = ztmp1*Linv 202 func_m = LOG(ztmp1) -LOG(z0) - psi_m_ecmwf(ztmp0) + psi_m_ecmwf(z0*Linv) 203 func_h = LOG(ztmp1*z0t) - psi_h_ecmwf(ztmp0) + psi_h_ecmwf(1./z0t*Linv) 204 282 ztmp0 = zu*Linv 283 func_m = LOG(zu) - LOG(z0) - psi_m_ecmwf(ztmp0) + psi_m_ecmwf( z0*Linv) 284 func_h = LOG(zu) - LOG(z0t) - psi_h_ecmwf(ztmp0) + psi_h_ecmwf(z0t*Linv) 205 285 206 286 !! ITERATION BLOCK 207 !! ***************208 209 287 DO j_itt = 1, nb_itt 210 288 211 289 !! Bulk Richardson Number at z=zu (Eq. 3.25) 212 ztmp0 = Ri_bulk( zu, t_zu, dt_zu, q_zu, dq_zu, U_blk)290 ztmp0 = Ri_bulk( zu, T_s, t_zu, q_s, q_zu, U_blk ) ! Bulk Richardson Number (BRN) 213 291 214 292 !! New estimate of the inverse of the Monin-Obukhon length (Linv == zeta/zu) : 215 Linv = ztmp0*func_m*func_m/func_h / zu ! From Eq. 3.23, Chap.3, p.33, IFS doc - Cy31r1 293 Linv = ztmp0*func_m*func_m/func_h / zu ! From Eq. 3.23, Chap.3.2.3, IFS doc - Cy40r1 294 !! Note: it is slightly different that the L we would get with the usual 295 Linv = SIGN( MIN(ABS(Linv),200._wp), Linv ) ! (prevent FPE from stupid values from masked region later on...) 216 296 217 297 !! Update func_m with new Linv: 218 ztmp1 = zu + z0 219 func_m = LOG(ztmp1) -LOG(z0) - psi_m_ecmwf(ztmp1*Linv) + psi_m_ecmwf(z0*Linv) 298 func_m = LOG(zu) -LOG(z0) - psi_m_ecmwf(zu*Linv) + psi_m_ecmwf(z0*Linv) ! LB: should be "zu+z0" rather than "zu" alone, but z0 is tiny wrt zu! 220 299 221 300 !! Need to update roughness lengthes: … … 223 302 ztmp2 = u_star*u_star 224 303 ztmp1 = znu_a/u_star 225 z0 = alpha_M*ztmp1 + charn0*ztmp2/grav 226 z0t = alpha_H*ztmp1 ! eq.3.26, Chap.3, p.34, IFS doc - Cy31r1 227 z0q = alpha_Q*ztmp1 228 229 !! Update wind at 10m taking into acount convection-related wind gustiness: 230 ! Only true when unstable (L<0) => when ztmp0 < 0 => - !!! 231 ztmp2 = ztmp2 * (MAX(-zi0*Linv/vkarmn,0.))**(2./3.) ! => w*^2 (combining Eq. 3.8 and 3.18, hap.3, IFS doc - Cy31r1) 232 !! => equivalent using Beta=1 (gustiness parameter, 1.25 for COARE, also zi0=600 in COARE..) 233 U_blk = MAX(sqrt(U_zu*U_zu + ztmp2), 0.2) ! eq.3.17, Chap.3, p.32, IFS doc - Cy31r1 304 z0 = MIN( ABS( alpha_M*ztmp1 + charn0*ztmp2/grav ) , 0.001_wp) 305 z0t = MIN( ABS( alpha_H*ztmp1 ) , 0.001_wp) ! eq.3.26, Chap.3, p.34, IFS doc - Cy31r1 306 z0q = MIN( ABS( alpha_Q*ztmp1 ) , 0.001_wp) 307 308 !! Update wind at zu with convection-related wind gustiness in unstable conditions (Chap. 3.2, IFS doc - Cy40r1, Eq.3.17 and Eq.3.18 + Eq.3.8) 309 ztmp2 = Beta0*Beta0*ztmp2*(MAX(-zi0*Linv/vkarmn,0._wp))**(2._wp/3._wp) ! square of wind gustiness contribution (combining Eq. 3.8 and 3.18, hap.3, IFS doc - Cy31r1) 310 !! ! Only true when unstable (L<0) => when ztmp0 < 0 => explains "-" before zi0 311 U_blk = MAX(SQRT(U_zu*U_zu + ztmp2), 0.2_wp) ! include gustiness in bulk wind speed 234 312 ! => 0.2 prevents U_blk to be 0 in stable case when U_zu=0. 235 313 … … 238 316 !! as well the air-sea differences: 239 317 IF( .NOT. l_zt_equal_zu ) THEN 240 241 318 !! Arrays func_m and func_h are free for a while so using them as temporary arrays... 242 func_h = psi_h_ecmwf( (zu+z0)*Linv) ! temporary array !!!243 func_m = psi_h_ecmwf( (zt+z0)*Linv) ! temporary array !!!319 func_h = psi_h_ecmwf(zu*Linv) ! temporary array !!! 320 func_m = psi_h_ecmwf(zt*Linv) ! temporary array !!! 244 321 245 322 ztmp2 = psi_h_ecmwf(z0t*Linv) 246 323 ztmp0 = func_h - ztmp2 247 ztmp1 = vkarmn/(LOG(zu +z0) - LOG(z0t) - ztmp0)324 ztmp1 = vkarmn/(LOG(zu) - LOG(z0t) - ztmp0) 248 325 t_star = dt_zu*ztmp1 249 326 ztmp2 = ztmp0 - func_m + ztmp2 … … 253 330 ztmp2 = psi_h_ecmwf(z0q*Linv) 254 331 ztmp0 = func_h - ztmp2 255 ztmp1 = vkarmn/(LOG(zu +z0) - LOG(z0q) - ztmp0)332 ztmp1 = vkarmn/(LOG(zu) - LOG(z0q) - ztmp0) 256 333 q_star = dq_zu*ztmp1 257 334 ztmp2 = ztmp0 - func_m + ztmp2 258 ztmp1 = log(zt/zu) + ztmp2335 ztmp1 = LOG(zt/zu) + ztmp2 259 336 q_zu = q_zt - q_star/vkarmn*ztmp1 260 261 dt_zu = t_zu - sst ; dt_zu = SIGN( MAX(ABS(dt_zu),1.E-6), dt_zu ) 262 dq_zu = q_zu - ssq ; dq_zu = SIGN( MAX(ABS(dq_zu),1.E-9), dq_zu ) 263 264 END IF 337 ENDIF 265 338 266 339 !! Updating because of updated z0 and z0t and new Linv... 267 ztmp1 = zu + z0 268 ztmp0 = ztmp1*Linv 269 func_m = log(ztmp1) - LOG(z0 ) - psi_m_ecmwf(ztmp0) + psi_m_ecmwf(z0 *Linv) 270 func_h = log(ztmp1) - LOG(z0t) - psi_h_ecmwf(ztmp0) + psi_h_ecmwf(z0t*Linv) 271 272 END DO 340 ztmp0 = zu*Linv 341 func_m = log(zu) - LOG(z0 ) - psi_m_ecmwf(ztmp0) + psi_m_ecmwf(z0 *Linv) 342 func_h = log(zu) - LOG(z0t) - psi_h_ecmwf(ztmp0) + psi_h_ecmwf(z0t*Linv) 343 344 345 IF( l_use_cs ) THEN 346 !! Cool-skin contribution 347 348 CALL UPDATE_QNSOL_TAU( zu, T_s, q_s, t_zu, q_zu, u_star, t_star, q_star, U_zu, U_blk, slp, rad_lw, & 349 & ztmp1, ztmp0, Qlat=ztmp2) ! Qnsol -> ztmp1 / Tau -> ztmp0 350 351 CALL CS_ECMWF( Qsw, ztmp1, u_star, zsst ) ! Qnsol -> ztmp1 352 353 T_s(:,:) = zsst(:,:) + dT_cs(:,:)*tmask(:,:,1) 354 IF( l_use_wl ) T_s(:,:) = T_s(:,:) + dT_wl(:,:)*tmask(:,:,1) 355 q_s(:,:) = rdct_qsat_salt*q_sat(MAX(T_s(:,:), 200._wp), slp(:,:)) 356 357 ENDIF 358 359 IF( l_use_wl ) THEN 360 !! Warm-layer contribution 361 CALL UPDATE_QNSOL_TAU( zu, T_s, q_s, t_zu, q_zu, u_star, t_star, q_star, U_zu, U_blk, slp, rad_lw, & 362 & ztmp1, ztmp2) ! Qnsol -> ztmp1 / Tau -> ztmp2 363 CALL WL_ECMWF( Qsw, ztmp1, u_star, zsst ) 364 !! Updating T_s and q_s !!! 365 T_s(:,:) = zsst(:,:) + dT_wl(:,:)*tmask(:,:,1) ! 366 IF( l_use_cs ) T_s(:,:) = T_s(:,:) + dT_cs(:,:)*tmask(:,:,1) 367 q_s(:,:) = rdct_qsat_salt*q_sat(MAX(T_s(:,:), 200._wp), slp(:,:)) 368 ENDIF 369 370 IF( l_use_cs .OR. l_use_wl .OR. (.NOT. l_zt_equal_zu) ) THEN 371 dt_zu = t_zu - T_s ; dt_zu = SIGN( MAX(ABS(dt_zu),1.E-6_wp), dt_zu ) 372 dq_zu = q_zu - q_s ; dq_zu = SIGN( MAX(ABS(dq_zu),1.E-9_wp), dq_zu ) 373 ENDIF 374 375 END DO !DO j_itt = 1, nb_itt 273 376 274 377 Cd = vkarmn*vkarmn/(func_m*func_m) 275 378 Ch = vkarmn*vkarmn/(func_m*func_h) 276 ztmp1 = log((zu + z0)/z0q) - psi_h_ecmwf((zu + z0)*Linv) + psi_h_ecmwf(z0q*Linv) ! func_q 277 Ce = vkarmn*vkarmn/(func_m*ztmp1) 278 279 ztmp1 = zu + z0 280 Cdn = vkarmn*vkarmn / (log(ztmp1/z0 )*log(ztmp1/z0 )) 281 Chn = vkarmn*vkarmn / (log(ztmp1/z0t)*log(ztmp1/z0t)) 282 Cen = vkarmn*vkarmn / (log(ztmp1/z0q)*log(ztmp1/z0q)) 283 284 END SUBROUTINE TURB_ECMWF 379 ztmp2 = log(zu/z0q) - psi_h_ecmwf(zu*Linv) + psi_h_ecmwf(z0q*Linv) ! func_q 380 Ce = vkarmn*vkarmn/(func_m*ztmp2) 381 382 Cdn = vkarmn*vkarmn / (log(zu/z0 )*log(zu/z0 )) 383 Chn = vkarmn*vkarmn / (log(zu/z0t)*log(zu/z0t)) 384 Cen = vkarmn*vkarmn / (log(zu/z0q)*log(zu/z0q)) 385 386 IF( l_use_cs .AND. PRESENT(pdT_cs) ) pdT_cs = dT_cs 387 IF( l_use_wl .AND. PRESENT(pdT_wl) ) pdT_wl = dT_wl 388 IF( l_use_wl .AND. PRESENT(pHz_wl) ) pHz_wl = Hz_wl 389 390 IF( l_use_cs .OR. l_use_wl ) DEALLOCATE ( zsst ) 391 392 END SUBROUTINE turb_ecmwf 285 393 286 394 … … 294 402 !! and L is M-O length 295 403 !! 296 !! ** Author: L. Brodeau, june 2016 / AeroBulk (https://sourceforge.net/p/aerobulk)404 !! ** Author: L. Brodeau, June 2016 / AeroBulk (https://github.com/brodeau/aerobulk/) 297 405 !!---------------------------------------------------------------------------------- 298 406 REAL(wp), DIMENSION(jpi,jpj) :: psi_m_ecmwf … … 302 410 REAL(wp) :: zzeta, zx, ztmp, psi_unst, psi_stab, stab 303 411 !!---------------------------------------------------------------------------------- 304 !305 412 DO jj = 1, jpj 306 413 DO ji = 1, jpi 307 414 ! 308 zzeta = MIN( pzeta(ji,jj) , 5. ) !! Very stable conditions (L positif and big!):415 zzeta = MIN( pzeta(ji,jj) , 5._wp ) !! Very stable conditions (L positif and big!): 309 416 ! 310 417 ! Unstable (Paulson 1970): 311 418 ! eq.3.20, Chap.3, p.33, IFS doc - Cy31r1 312 zx = SQRT(ABS(1. - 16.*zzeta))313 ztmp = 1. + SQRT(zx)419 zx = SQRT(ABS(1._wp - 16._wp*zzeta)) 420 ztmp = 1._wp + SQRT(zx) 314 421 ztmp = ztmp*ztmp 315 psi_unst = LOG( 0.125 *ztmp*(1.+ zx) ) &316 & -2. *ATAN( SQRT(zx) ) + 0.5*rpi422 psi_unst = LOG( 0.125_wp*ztmp*(1._wp + zx) ) & 423 & -2._wp*ATAN( SQRT(zx) ) + 0.5_wp*rpi 317 424 ! 318 425 ! Unstable: 319 426 ! eq.3.22, Chap.3, p.33, IFS doc - Cy31r1 320 psi_stab = -2. /3.*(zzeta - 5./0.35)*EXP(-0.35*zzeta) &321 & - zzeta - 2. /3.*5./0.35427 psi_stab = -2._wp/3._wp*(zzeta - 5._wp/0.35_wp)*EXP(-0.35_wp*zzeta) & 428 & - zzeta - 2._wp/3._wp*5._wp/0.35_wp 322 429 ! 323 430 ! Combining: 324 stab = 0.5 + SIGN(0.5, zzeta) ! zzeta > 0 => stab = 1325 ! 326 psi_m_ecmwf(ji,jj) = (1. - stab) * psi_unst & ! (zzeta < 0) Unstable327 & + stab * psi_stab ! (zzeta > 0) Stable431 stab = 0.5_wp + SIGN(0.5_wp, zzeta) ! zzeta > 0 => stab = 1 432 ! 433 psi_m_ecmwf(ji,jj) = (1._wp - stab) * psi_unst & ! (zzeta < 0) Unstable 434 & + stab * psi_stab ! (zzeta > 0) Stable 328 435 ! 329 436 END DO 330 437 END DO 331 !332 438 END FUNCTION psi_m_ecmwf 333 439 334 440 335 441 FUNCTION psi_h_ecmwf( pzeta ) 336 442 !!---------------------------------------------------------------------------------- … … 342 448 !! and L is M-O length 343 449 !! 344 !! ** Author: L. Brodeau, june 2016 / AeroBulk (https://sourceforge.net/p/aerobulk)450 !! ** Author: L. Brodeau, June 2016 / AeroBulk (https://github.com/brodeau/aerobulk/) 345 451 !!---------------------------------------------------------------------------------- 346 452 REAL(wp), DIMENSION(jpi,jpj) :: psi_h_ecmwf … … 354 460 DO ji = 1, jpi 355 461 ! 356 zzeta = MIN(pzeta(ji,jj) , 5. ) ! Very stable conditions (L positif and big!):357 ! 358 zx = ABS(1. - 16.*zzeta)**.25 ! this is actually (1/phi_m)**2 !!!462 zzeta = MIN(pzeta(ji,jj) , 5._wp) ! Very stable conditions (L positif and big!): 463 ! 464 zx = ABS(1._wp - 16._wp*zzeta)**.25 ! this is actually (1/phi_m)**2 !!! 359 465 ! ! eq.3.19, Chap.3, p.33, IFS doc - Cy31r1 360 466 ! Unstable (Paulson 1970) : 361 psi_unst = 2. *LOG(0.5*(1.+ zx*zx)) ! eq.3.20, Chap.3, p.33, IFS doc - Cy31r1467 psi_unst = 2._wp*LOG(0.5_wp*(1._wp + zx*zx)) ! eq.3.20, Chap.3, p.33, IFS doc - Cy31r1 362 468 ! 363 469 ! Stable: 364 psi_stab = -2. /3.*(zzeta - 5./0.35)*EXP(-0.35*zzeta) & ! eq.3.22, Chap.3, p.33, IFS doc - Cy31r1365 & - ABS(1. + 2./3.*zzeta)**1.5 - 2./3.*5./0.35 + 1.470 psi_stab = -2._wp/3._wp*(zzeta - 5._wp/0.35_wp)*EXP(-0.35_wp*zzeta) & ! eq.3.22, Chap.3, p.33, IFS doc - Cy31r1 471 & - ABS(1._wp + 2._wp/3._wp*zzeta)**1.5_wp - 2._wp/3._wp*5._wp/0.35_wp + 1._wp 366 472 ! LB: added ABS() to avoid NaN values when unstable, which contaminates the unstable solution... 367 473 ! 368 stab = 0.5 + SIGN(0.5, zzeta) ! zzeta > 0 => stab = 1369 ! 370 ! 371 psi_h_ecmwf(ji,jj) = (1. - stab) * psi_unst & ! (zzeta < 0) Unstable372 & + stab * psi_stab ! (zzeta > 0) Stable474 stab = 0.5_wp + SIGN(0.5_wp, zzeta) ! zzeta > 0 => stab = 1 475 ! 476 ! 477 psi_h_ecmwf(ji,jj) = (1._wp - stab) * psi_unst & ! (zzeta < 0) Unstable 478 & + stab * psi_stab ! (zzeta > 0) Stable 373 479 ! 374 480 END DO 375 481 END DO 376 !377 482 END FUNCTION psi_h_ecmwf 378 483 379 380 FUNCTION Ri_bulk( pz, ptz, pdt, pqz, pdq, pub )381 !!----------------------------------------------------------------------------------382 !! Bulk Richardson number (Eq. 3.25 IFS doc)383 !!384 !! ** Author: L. Brodeau, june 2016 / AeroBulk (https://sourceforge.net/p/aerobulk)385 !!----------------------------------------------------------------------------------386 REAL(wp), DIMENSION(jpi,jpj) :: Ri_bulk !387 !388 REAL(wp) , INTENT(in) :: pz ! height above the sea [m]389 REAL(wp), DIMENSION(jpi,jpj), INTENT(in) :: ptz ! air temperature at pz m [K]390 REAL(wp), DIMENSION(jpi,jpj), INTENT(in) :: pdt ! ptz - sst [K]391 REAL(wp), DIMENSION(jpi,jpj), INTENT(in) :: pqz ! air temperature at pz m [kg/kg]392 REAL(wp), DIMENSION(jpi,jpj), INTENT(in) :: pdq ! pqz - ssq [kg/kg]393 REAL(wp), DIMENSION(jpi,jpj), INTENT(in) :: pub ! bulk wind speed [m/s]394 !!----------------------------------------------------------------------------------395 !396 Ri_bulk = grav*pz/(pub*pub) &397 & * ( pdt/(ptz - 0.5_wp*(pdt + grav*pz/(Cp_dry+Cp_vap*pqz))) &398 & + rctv0*pdq )399 !400 END FUNCTION Ri_bulk401 402 403 FUNCTION visc_air(ptak)404 !!----------------------------------------------------------------------------------405 !! Air kinetic viscosity (m^2/s) given from temperature in degrees...406 !!407 !! ** Author: L. Brodeau, june 2016 / AeroBulk (https://sourceforge.net/p/aerobulk)408 !!----------------------------------------------------------------------------------409 REAL(wp), DIMENSION(jpi,jpj) :: visc_air !410 REAL(wp), DIMENSION(jpi,jpj), INTENT(in) :: ptak ! air temperature in (K)411 !412 INTEGER :: ji, jj ! dummy loop indices413 REAL(wp) :: ztc, ztc2 ! local scalar414 !!----------------------------------------------------------------------------------415 !416 DO jj = 1, jpj417 DO ji = 1, jpi418 ztc = ptak(ji,jj) - rt0 ! air temp, in deg. C419 ztc2 = ztc*ztc420 visc_air(ji,jj) = 1.326e-5*(1. + 6.542E-3*ztc + 8.301e-6*ztc2 - 4.84e-9*ztc2*ztc)421 END DO422 END DO423 !424 END FUNCTION visc_air425 484 426 485 !!====================================================================== -
NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/SBC/sbcblk_algo_ncar.F90
r10190 r12182 11 11 !! 12 12 !! Routine turb_ncar maintained and developed in AeroBulk 13 !! (http ://aerobulk.sourceforge.net/)13 !! (https://github.com/brodeau/aerobulk/) 14 14 !! 15 15 !! L. Brodeau, 2015 … … 38 38 USE lib_fortran ! to use key_nosignedzero 39 39 40 USE sbcblk_phy ! all thermodynamics functions, rho_air, q_sat, etc... !LB 40 41 41 42 IMPLICIT NONE 42 43 PRIVATE 43 44 44 PUBLIC :: TURB_NCAR ! called by sbcblk.F90 45 46 ! ! NCAR own values for given constants: 47 REAL(wp), PARAMETER :: rctv0 = 0.608 ! constant to obtain virtual temperature... 48 45 PUBLIC :: TURB_NCAR ! called by sbcblk.F90 46 47 INTEGER , PARAMETER :: nb_itt = 5 ! number of itterations 48 49 49 !!---------------------------------------------------------------------- 50 50 CONTAINS … … 61 61 !! Returns the effective bulk wind speed at 10m to be used in the bulk formulas 62 62 !! 63 !! ** Method : Monin Obukhov Similarity Theory64 !! + Large & Yeager (2004,2008) closure: CD_n10 = f(U_n10)65 !!66 !! ** References : Large & Yeager, 2004 / Large & Yeager, 200867 !!68 !! ** Last update: Laurent Brodeau, June 2014:69 !! - handles both cases zt=zu and zt/=zu70 !! - optimized: less 2D arrays allocated and less operations71 !! - better first guess of stability by checking air-sea difference of virtual temperature72 !! rather than temperature difference only...73 !! - added function "cd_neutral_10m" that uses the improved parametrization of74 !! Large & Yeager 2008. Drag-coefficient reduction for Cyclone conditions!75 !! - using code-wide physical constants defined into "phycst.mod" rather than redifining them76 !! => 'vkarmn' and 'grav'77 !!78 !! ** Author: L. Brodeau, june 2016 / AeroBulk (https://sourceforge.net/p/aerobulk)79 63 !! 80 64 !! INPUT : 81 65 !! ------- 82 66 !! * zt : height for temperature and spec. hum. of air [m] 83 !! * zu : height for wind speed (generally 10m) [m] 84 !! * U_zu : scalar wind speed at 10m [m/s] 85 !! * sst : SST [K] 67 !! * zu : height for wind speed (usually 10m) [m] 68 !! * sst : bulk SST [K] 86 69 !! * t_zt : potential air temperature at zt [K] 87 70 !! * ssq : specific humidity at saturation at SST [kg/kg] 88 71 !! * q_zt : specific humidity of air at zt [kg/kg] 72 !! * U_zu : scalar wind speed at zu [m/s] 89 73 !! 90 74 !! … … 96 80 !! * t_zu : pot. air temperature adjusted at wind height zu [K] 97 81 !! * q_zu : specific humidity of air // [kg/kg] 98 !! * U_blk : bulk wind at 10m [m/s] 82 !! * U_blk : bulk wind speed at zu [m/s] 83 !! 84 !! 85 !! ** Author: L. Brodeau, June 2019 / AeroBulk (https://github.com/brodeau/aerobulk/) 99 86 !!---------------------------------------------------------------------------------- 100 87 REAL(wp), INTENT(in ) :: zt ! height for t_zt and q_zt [m] … … 103 90 REAL(wp), INTENT(in ), DIMENSION(jpi,jpj) :: t_zt ! potential air temperature [Kelvin] 104 91 REAL(wp), INTENT(in ), DIMENSION(jpi,jpj) :: ssq ! sea surface specific humidity [kg/kg] 105 REAL(wp), INTENT(in ), DIMENSION(jpi,jpj) :: q_zt ! specific air humidity 92 REAL(wp), INTENT(in ), DIMENSION(jpi,jpj) :: q_zt ! specific air humidity at zt [kg/kg] 106 93 REAL(wp), INTENT(in ), DIMENSION(jpi,jpj) :: U_zu ! relative wind module at zu [m/s] 107 94 REAL(wp), INTENT( out), DIMENSION(jpi,jpj) :: Cd ! transfer coefficient for momentum (tau) … … 110 97 REAL(wp), INTENT( out), DIMENSION(jpi,jpj) :: t_zu ! pot. air temp. adjusted at zu [K] 111 98 REAL(wp), INTENT( out), DIMENSION(jpi,jpj) :: q_zu ! spec. humidity adjusted at zu [kg/kg] 112 REAL(wp), INTENT( out), DIMENSION(jpi,jpj) :: U_blk ! bulk wind at 10m[m/s]99 REAL(wp), INTENT( out), DIMENSION(jpi,jpj) :: U_blk ! bulk wind speed at zu [m/s] 113 100 REAL(wp), INTENT( out), DIMENSION(jpi,jpj) :: Cdn, Chn, Cen ! neutral transfer coefficients 114 101 ! 115 INTEGER :: j_itt 116 LOGICAL :: l_zt_equal_zu = .FALSE. ! if q and t are given at same height as U 117 INTEGER , PARAMETER :: nb_itt = 4 ! number of itterations 102 INTEGER :: j_itt 103 LOGICAL :: l_zt_equal_zu = .FALSE. ! if q and t are given at same height as U 118 104 ! 119 105 REAL(wp), DIMENSION(jpi,jpj) :: Cx_n10 ! 10m neutral latent/sensible coefficient … … 126 112 ! 127 113 l_zt_equal_zu = .FALSE. 128 IF( ABS(zu - zt) < 0.01 )l_zt_equal_zu = .TRUE. ! testing "zu == zt" is risky with double precision129 130 U_blk = MAX( 0.5 , U_zu ) ! relative wind speed at zu (normally 10m), we don't want to fall under 0.5 m/s114 IF( ABS(zu - zt) < 0.01_wp ) l_zt_equal_zu = .TRUE. ! testing "zu == zt" is risky with double precision 115 116 U_blk = MAX( 0.5_wp , U_zu ) ! relative wind speed at zu (normally 10m), we don't want to fall under 0.5 m/s 131 117 132 118 !! First guess of stability: 133 ztmp0 = t_zt*(1. + rctv0*q_zt) - sst*(1. + rctv0*ssq) ! air-sea difference of virtual pot. temp. at zt134 stab = 0.5 + sign(0.5,ztmp0) ! stab = 1 if dTv > 0 => STABLE, 0 if unstable119 ztmp0 = virt_temp(t_zt, q_zt) - virt_temp(sst, ssq) ! air-sea difference of virtual pot. temp. at zt 120 stab = 0.5_wp + sign(0.5_wp,ztmp0) ! stab = 1 if dTv > 0 => STABLE, 0 if unstable 135 121 136 122 !! Neutral coefficients at 10m: … … 139 125 ztmp0 (:,:) = cdn_wave(:,:) 140 126 ELSE 141 127 ztmp0 = cd_neutral_10m( U_blk ) 142 128 ENDIF 143 129 … … 146 132 !! Initializing transf. coeff. with their first guess neutral equivalents : 147 133 Cd = ztmp0 148 Ce = 1.e-3 *( 34.6* sqrt_Cd_n10 )149 Ch = 1.e-3 *sqrt_Cd_n10*(18.*stab + 32.7*(1.- stab))134 Ce = 1.e-3_wp*( 34.6_wp * sqrt_Cd_n10 ) 135 Ch = 1.e-3_wp*sqrt_Cd_n10*(18._wp*stab + 32.7_wp*(1._wp - stab)) 150 136 stab = sqrt_Cd_n10 ! Temporaty array !!! stab == SQRT(Cd) 151 137 152 IF( ln_cdgw ) Cen = Ce ; Chn = Ch 138 IF( ln_cdgw ) THEN 139 Cen = Ce 140 Chn = Ch 141 ENDIF 153 142 154 143 !! Initializing values at z_u with z_t values: 155 144 t_zu = t_zt ; q_zu = q_zt 156 145 157 !! * Now starting iteration loop158 DO j_itt =1, nb_itt146 !! ITERATION BLOCK 147 DO j_itt = 1, nb_itt 159 148 ! 160 149 ztmp1 = t_zu - sst ! Updating air/sea differences … … 162 151 163 152 ! Updating turbulent scales : (L&Y 2004 eq. (7)) 164 ztmp1 = Ch/stab*ztmp1 ! theta* (stab == SQRT(Cd)) 165 ztmp2 = Ce/stab*ztmp2 ! q* (stab == SQRT(Cd)) 166 167 ztmp0 = 1. + rctv0*q_zu ! multiply this with t and you have the virtual temperature 153 ztmp0 = stab*U_blk ! u* (stab == SQRT(Cd)) 154 ztmp1 = Ch/stab*ztmp1 ! theta* (stab == SQRT(Cd)) 155 ztmp2 = Ce/stab*ztmp2 ! q* (stab == SQRT(Cd)) 168 156 169 157 ! Estimate the inverse of Monin-Obukov length (1/L) at height zu: 170 ztmp0 = (grav*vkarmn/(t_zu*ztmp0)*(ztmp1*ztmp0 + rctv0*t_zu*ztmp2)) / (Cd*U_blk*U_blk) 171 ! ( Cd*U_blk*U_blk is U*^2 at zu ) 172 158 ztmp0 = One_on_L( t_zu, q_zu, ztmp0, ztmp1, ztmp2 ) 159 173 160 !! Stability parameters : 174 zeta_u = zu*ztmp0 ; zeta_u = sign( min(abs(zeta_u),10.0), zeta_u ) 161 zeta_u = zu*ztmp0 162 zeta_u = sign( min(abs(zeta_u),10._wp), zeta_u ) 175 163 zpsi_h_u = psi_h( zeta_u ) 176 164 … … 178 166 IF( .NOT. l_zt_equal_zu ) THEN 179 167 !! Array 'stab' is free for the moment so using it to store 'zeta_t' 180 stab = zt*ztmp0 ; stab = SIGN( MIN(ABS(stab),10.0), stab ) ! Temporaty array stab == zeta_t !!! 168 stab = zt*ztmp0 169 stab = SIGN( MIN(ABS(stab),10._wp), stab ) ! Temporaty array stab == zeta_t !!! 181 170 stab = LOG(zt/zu) + zpsi_h_u - psi_h(stab) ! stab just used as temp array again! 182 171 t_zu = t_zt - ztmp1/vkarmn*stab ! ztmp1 is still theta* L&Y 2004 eq.(9b) 183 172 q_zu = q_zt - ztmp2/vkarmn*stab ! ztmp2 is still q* L&Y 2004 eq.(9c) 184 q_zu = max(0., q_zu) 185 END IF 186 173 q_zu = max(0._wp, q_zu) 174 ENDIF 175 176 ! Update neutral wind speed at 10m and neutral Cd at 10m (L&Y 2004 eq. 9a)... 177 ! In very rare low-wind conditions, the old way of estimating the 178 ! neutral wind speed at 10m leads to a negative value that causes the code 179 ! to crash. To prevent this a threshold of 0.25m/s is imposed. 187 180 ztmp2 = psi_m(zeta_u) 188 181 IF( ln_cdgw ) THEN ! surface wave case 189 182 stab = vkarmn / ( vkarmn / sqrt_Cd_n10 - ztmp2 ) ! (stab == SQRT(Cd)) 190 183 Cd = stab * stab 191 ztmp0 = (LOG(zu/10. ) - zpsi_h_u) / vkarmn / sqrt_Cd_n10184 ztmp0 = (LOG(zu/10._wp) - zpsi_h_u) / vkarmn / sqrt_Cd_n10 192 185 ztmp2 = stab / sqrt_Cd_n10 ! (stab == SQRT(Cd)) 193 ztmp1 = 1. + Chn * ztmp0186 ztmp1 = 1._wp + Chn * ztmp0 194 187 Ch = Chn * ztmp2 / ztmp1 ! L&Y 2004 eq. (10b) 195 ztmp1 = 1. + Cen * ztmp0188 ztmp1 = 1._wp + Cen * ztmp0 196 189 Ce = Cen * ztmp2 / ztmp1 ! L&Y 2004 eq. (10c) 197 190 198 191 ELSE 199 200 201 202 203 ztmp0 = MAX( 0.25 , U_blk/(1. + sqrt_Cd_n10/vkarmn*(LOG(zu/10.) - ztmp2)) ) ! U_n10 (ztmp2 == psi_m(zeta_u))204 205 206 207 208 stab = 0.5 + sign(0.5,zeta_u)! update stability209 Cx_n10 = 1.e-3*sqrt_Cd_n10*(18.*stab + 32.7*(1.- stab)) ! L&Y 2004 eq. (6c-6d) (Cx_n10 == Ch_n10)210 211 212 213 ztmp1 = 1. + sqrt_Cd_n10/vkarmn*(LOG(zu/10.) - ztmp2) ! L&Y 2004 eq. (10a) (ztmp2 == psi_m(zeta_u))214 215 216 217 ztmp0 = (LOG(zu/10.) - zpsi_h_u) / vkarmn / sqrt_Cd_n10218 219 ztmp1 = 1.+ Cx_n10*ztmp0 ! (Cx_n10 == Ch_n10)220 221 222 Cx_n10 = 1.e-3 * (34.6* sqrt_Cd_n10) ! L&Y 2004 eq. (6b) ! Cx_n10 == Ce_n10223 224 ztmp1 = 1.+ Cx_n10*ztmp0225 226 227 ! 228 END DO 229 ! 192 ! Update neutral wind speed at 10m and neutral Cd at 10m (L&Y 2004 eq. 9a)... 193 ! In very rare low-wind conditions, the old way of estimating the 194 ! neutral wind speed at 10m leads to a negative value that causes the code 195 ! to crash. To prevent this a threshold of 0.25m/s is imposed. 196 ztmp0 = MAX( 0.25_wp , U_blk/(1._wp + sqrt_Cd_n10/vkarmn*(LOG(zu/10._wp) - ztmp2)) ) ! U_n10 (ztmp2 == psi_m(zeta_u)) 197 ztmp0 = cd_neutral_10m(ztmp0) ! Cd_n10 198 Cdn(:,:) = ztmp0 199 sqrt_Cd_n10 = sqrt(ztmp0) 200 201 stab = 0.5_wp + sign(0.5_wp,zeta_u) ! update stability 202 Cx_n10 = 1.e-3_wp*sqrt_Cd_n10*(18._wp*stab + 32.7_wp*(1._wp - stab)) ! L&Y 2004 eq. (6c-6d) (Cx_n10 == Ch_n10) 203 Chn(:,:) = Cx_n10 204 205 !! Update of transfer coefficients: 206 ztmp1 = 1._wp + sqrt_Cd_n10/vkarmn*(LOG(zu/10._wp) - ztmp2) ! L&Y 2004 eq. (10a) (ztmp2 == psi_m(zeta_u)) 207 Cd = ztmp0 / ( ztmp1*ztmp1 ) 208 stab = SQRT( Cd ) ! Temporary array !!! (stab == SQRT(Cd)) 209 210 ztmp0 = (LOG(zu/10._wp) - zpsi_h_u) / vkarmn / sqrt_Cd_n10 211 ztmp2 = stab / sqrt_Cd_n10 ! (stab == SQRT(Cd)) 212 ztmp1 = 1._wp + Cx_n10*ztmp0 ! (Cx_n10 == Ch_n10) 213 Ch = Cx_n10*ztmp2 / ztmp1 ! L&Y 2004 eq. (10b) 214 215 Cx_n10 = 1.e-3_wp * (34.6_wp * sqrt_Cd_n10) ! L&Y 2004 eq. (6b) ! Cx_n10 == Ce_n10 216 Cen(:,:) = Cx_n10 217 ztmp1 = 1._wp + Cx_n10*ztmp0 218 Ce = Cx_n10*ztmp2 / ztmp1 ! L&Y 2004 eq. (10c) 219 ENDIF 220 221 END DO !DO j_itt = 1, nb_itt 222 230 223 END SUBROUTINE turb_ncar 231 224 … … 238 231 !! Origin: Large & Yeager 2008 eq.(11a) and eq.(11b) 239 232 !! 240 !! ** Author: L. Brodeau, june 2016 / AeroBulk (https:// sourceforge.net/p/aerobulk)233 !! ** Author: L. Brodeau, june 2016 / AeroBulk (https://github.com/brodeau/aerobulk/) 241 234 !!---------------------------------------------------------------------------------- 242 235 REAL(wp), DIMENSION(jpi,jpj), INTENT(in) :: pw10 ! scalar wind speed at 10m (m/s) … … 255 248 ! 256 249 ! When wind speed > 33 m/s => Cyclone conditions => special treatment 257 zgt33 = 0.5 + SIGN( 0.5, (zw - 33.) ) ! If pw10 < 33. => 0, else => 1258 ! 259 cd_neutral_10m(ji,jj) = 1.e-3 * ( &260 & (1. - zgt33)*( 2.7/zw + 0.142 + zw/13.09 - 3.14807E-10*zw6) & ! wind < 33 m/s261 & + zgt33 * 2.34 )! wind >= 33 m/s262 ! 263 cd_neutral_10m(ji,jj) = MAX(cd_neutral_10m(ji,jj), 1.E-6 )250 zgt33 = 0.5_wp + SIGN( 0.5_wp, (zw - 33._wp) ) ! If pw10 < 33. => 0, else => 1 251 ! 252 cd_neutral_10m(ji,jj) = 1.e-3_wp * ( & 253 & (1._wp - zgt33)*( 2.7_wp/zw + 0.142_wp + zw/13.09_wp - 3.14807E-10_wp*zw6) & ! wind < 33 m/s 254 & + zgt33 * 2.34_wp ) ! wind >= 33 m/s 255 ! 256 cd_neutral_10m(ji,jj) = MAX(cd_neutral_10m(ji,jj), 1.E-6_wp) 264 257 ! 265 258 END DO … … 273 266 !! Universal profile stability function for momentum 274 267 !! !! Psis, L&Y 2004 eq. (8c), (8d), (8e) 275 !! 276 !! pzet 0 : stability paramenter, z/L where z is altitude measurement268 !! 269 !! pzeta : stability paramenter, z/L where z is altitude measurement 277 270 !! and L is M-O length 278 271 !! 279 !! ** Author: L. Brodeau, june 2016 / AeroBulk (https://sourceforge.net/p/aerobulk)280 !!---------------------------------------------------------------------------------- 281 REAL(wp), DIMENSION(jpi,jpj) , INTENT(in) :: pzeta282 REAL(wp), DIMENSION(jpi,jpj) :: psi_m283 ! 284 INTEGER :: ji, jj 272 !! ** Author: L. Brodeau, June 2016 / AeroBulk (https://github.com/brodeau/aerobulk/) 273 !!---------------------------------------------------------------------------------- 274 REAL(wp), DIMENSION(jpi,jpj) :: psi_m 275 REAL(wp), DIMENSION(jpi,jpj), INTENT(in) :: pzeta 276 ! 277 INTEGER :: ji, jj ! dummy loop indices 285 278 REAL(wp) :: zx2, zx, zstab ! local scalars 286 279 !!---------------------------------------------------------------------------------- 287 !288 280 DO jj = 1, jpj 289 281 DO ji = 1, jpi 290 zx2 = SQRT( ABS( 1. - 16.*pzeta(ji,jj) ) )291 zx2 = MAX ( zx2 , 1.)282 zx2 = SQRT( ABS( 1._wp - 16._wp*pzeta(ji,jj) ) ) 283 zx2 = MAX( zx2 , 1._wp ) 292 284 zx = SQRT( zx2 ) 293 zstab = 0.5 + SIGN( 0.5, pzeta(ji,jj) )294 ! 295 psi_m(ji,jj) = zstab * (-5. *pzeta(ji,jj)) & ! Stable296 & + (1. - zstab) * (2.*LOG((1. + zx)*0.5) & ! Unstable297 & + LOG((1. + zx2)*0.5) - 2.*ATAN(zx) + rpi*0.5) ! "285 zstab = 0.5_wp + SIGN( 0.5_wp , pzeta(ji,jj) ) 286 ! 287 psi_m(ji,jj) = zstab * (-5._wp*pzeta(ji,jj)) & ! Stable 288 & + (1._wp - zstab) * (2._wp*LOG((1._wp + zx)*0.5_wp) & ! Unstable 289 & + LOG((1._wp + zx2)*0.5_wp) - 2._wp*ATAN(zx) + rpi*0.5_wp) ! " 298 290 ! 299 291 END DO 300 292 END DO 301 !302 293 END FUNCTION psi_m 303 294 … … 308 299 !! !! Psis, L&Y 2004 eq. (8c), (8d), (8e) 309 300 !! 310 !! pzet 0 : stability paramenter, z/L where z is altitude measurement301 !! pzeta : stability paramenter, z/L where z is altitude measurement 311 302 !! and L is M-O length 312 303 !! 313 !! ** Author: L. Brodeau, june 2016 / AeroBulk (https://sourceforge.net/p/aerobulk) 314 !!---------------------------------------------------------------------------------- 304 !! ** Author: L. Brodeau, June 2016 / AeroBulk (https://github.com/brodeau/aerobulk/) 305 !!---------------------------------------------------------------------------------- 306 REAL(wp), DIMENSION(jpi,jpj) :: psi_h 315 307 REAL(wp), DIMENSION(jpi,jpj), INTENT(in) :: pzeta 316 REAL(wp), DIMENSION(jpi,jpj) :: psi_h 317 ! 318 INTEGER :: ji, jj ! dummy loop indices 308 ! 309 INTEGER :: ji, jj ! dummy loop indices 319 310 REAL(wp) :: zx2, zstab ! local scalars 320 311 !!---------------------------------------------------------------------------------- … … 322 313 DO jj = 1, jpj 323 314 DO ji = 1, jpi 324 zx2 = SQRT( ABS( 1. - 16.*pzeta(ji,jj) ) )325 zx2 = MAX ( zx2 , 1.)326 zstab = 0.5 + SIGN( 0.5, pzeta(ji,jj) )327 ! 328 psi_h(ji,jj) = zstab * (-5. *pzeta(ji,jj)) & ! Stable329 & + (1. - zstab) * (2.*LOG( (1. + zx2)*0.5)) ! Unstable315 zx2 = SQRT( ABS( 1._wp - 16._wp*pzeta(ji,jj) ) ) 316 zx2 = MAX( zx2 , 1._wp ) 317 zstab = 0.5_wp + SIGN( 0.5_wp , pzeta(ji,jj) ) 318 ! 319 psi_h(ji,jj) = zstab * (-5._wp*pzeta(ji,jj)) & ! Stable 320 & + (1._wp - zstab) * (2._wp*LOG( (1._wp + zx2)*0.5_wp )) ! Unstable 330 321 ! 331 322 END DO 332 323 END DO 333 !334 324 END FUNCTION psi_h 335 325 -
NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/SBC/sbccpl.F90
r12150 r12182 451 451 CASE( 'conservative' ) 452 452 srcv( (/jpr_rain, jpr_snow, jpr_ievp, jpr_tevp/) )%laction = .TRUE. 453 IF 453 IF( k_ice <= 1 ) srcv(jpr_ievp)%laction = .FALSE. 454 454 CASE( 'oce and ice' ) ; srcv( (/jpr_ievp, jpr_sbpr, jpr_semp, jpr_oemp/) )%laction = .TRUE. 455 455 CASE default ; CALL ctl_stop( 'sbc_cpl_init: wrong definition of sn_rcv_emp%cldes' ) … … 532 532 ! ! ------------------------- ! 533 533 srcv(jpr_taum)%clname = 'O_TauMod' ; IF( TRIM(sn_rcv_taumod%cldes) == 'coupled' ) srcv(jpr_taum)%laction = .TRUE. 534 lhftau = srcv(jpr_taum)%laction535 534 ! 536 535 ! ! ------------------------- ! … … 557 556 srcv(jpr_botm )%clname = 'OBotMlt' 558 557 IF( TRIM(sn_rcv_iceflx%cldes) == 'coupled' ) THEN 559 IF 558 IF( TRIM( sn_rcv_iceflx%clcat ) == 'yes' ) THEN 560 559 srcv(jpr_topm:jpr_botm)%nct = nn_cats_cpl 561 560 ELSE … … 568 567 ! ! ------------------------- ! 569 568 srcv(jpr_ts_ice)%clname = 'OTsfIce' ! needed by Met Office 570 IF 571 IF 572 IF 569 IF( TRIM( sn_rcv_ts_ice%cldes ) == 'ice' ) srcv(jpr_ts_ice)%laction = .TRUE. 570 IF( TRIM( sn_rcv_ts_ice%clcat ) == 'yes' ) srcv(jpr_ts_ice)%nct = nn_cats_cpl 571 IF( TRIM( sn_rcv_emp%clcat ) == 'yes' ) srcv(jpr_ievp)%nct = nn_cats_cpl 573 572 574 573 ! ! ------------------------- ! … … 692 691 ! for example O_Runoff received by OPA from SAS and therefore O_Runoff received by SAS from the Atmosphere 693 692 DO jn = 1, jprcv 694 IF 693 IF( srcv(jn)%clname(1:1) == "O" ) srcv(jn)%clname = "S"//srcv(jn)%clname(2:LEN(srcv(jn)%clname)) 695 694 END DO 696 695 ! … … 719 718 ! =================================================== ! 720 719 DO jn = 1, jprcv 721 IF 720 IF( srcv(jn)%laction ) ALLOCATE( frcv(jn)%z3(jpi,jpj,srcv(jn)%nct) ) 722 721 END DO 723 722 ! Allocate taum part of frcv which is used even when not received as coupling field 724 IF 723 IF( .NOT. srcv(jpr_taum)%laction ) ALLOCATE( frcv(jpr_taum)%z3(jpi,jpj,srcv(jpr_taum)%nct) ) 725 724 ! Allocate w10m part of frcv which is used even when not received as coupling field 726 IF 725 IF( .NOT. srcv(jpr_w10m)%laction ) ALLOCATE( frcv(jpr_w10m)%z3(jpi,jpj,srcv(jpr_w10m)%nct) ) 727 726 ! Allocate jpr_otx1 part of frcv which is used even when not received as coupling field 728 IF 729 IF 727 IF( .NOT. srcv(jpr_otx1)%laction ) ALLOCATE( frcv(jpr_otx1)%z3(jpi,jpj,srcv(jpr_otx1)%nct) ) 728 IF( .NOT. srcv(jpr_oty1)%laction ) ALLOCATE( frcv(jpr_oty1)%z3(jpi,jpj,srcv(jpr_oty1)%nct) ) 730 729 ! Allocate itx1 and ity1 as they are used in sbc_cpl_ice_tau even if srcv(jpr_itx1)%laction = .FALSE. 731 730 IF( k_ice /= 0 ) THEN 732 IF 733 IF 734 END 731 IF( .NOT. srcv(jpr_itx1)%laction ) ALLOCATE( frcv(jpr_itx1)%z3(jpi,jpj,srcv(jpr_itx1)%nct) ) 732 IF( .NOT. srcv(jpr_ity1)%laction ) ALLOCATE( frcv(jpr_ity1)%z3(jpi,jpj,srcv(jpr_ity1)%nct) ) 733 ENDIF 735 734 736 735 ! ================================ ! … … 756 755 CASE( 'oce and ice' , 'weighted oce and ice' , 'oce and weighted ice' ) 757 756 ssnd( (/jps_toce, jps_tice/) )%laction = .TRUE. 758 IF 757 IF( TRIM( sn_snd_temp%clcat ) == 'yes' ) ssnd(jps_tice)%nct = nn_cats_cpl 759 758 CASE( 'mixed oce-ice' ) ; ssnd( jps_tmix )%laction = .TRUE. 760 759 CASE default ; CALL ctl_stop( 'sbc_cpl_init: wrong definition of sn_snd_temp%cldes' ) … … 776 775 ! 1. sending mixed oce-ice albedo or 777 776 ! 2. receiving mixed oce-ice solar radiation 778 IF 777 IF( TRIM ( sn_snd_alb%cldes ) == 'mixed oce-ice' .OR. TRIM ( sn_rcv_qsr%cldes ) == 'mixed oce-ice' ) THEN 779 778 CALL oce_alb( zaos, zacs ) 780 779 ! Due to lack of information on nebulosity : mean clear/overcast sky … … 795 794 ssnd(jps_fice1)%laction = .TRUE. ! First-order regridded ice concentration, to be used producing atmos-to-ice fluxes (Met Office requirement) 796 795 ! Currently no namelist entry to determine sending of multi-category ice fraction so use the thickness entry for now 797 IF 798 IF 796 IF( TRIM( sn_snd_thick%clcat ) == 'yes' ) ssnd(jps_fice)%nct = nn_cats_cpl 797 IF( TRIM( sn_snd_thick1%clcat ) == 'yes' ) ssnd(jps_fice1)%nct = nn_cats_cpl 799 798 ENDIF 800 799 801 IF 800 IF(TRIM( sn_snd_ifrac%cldes ) == 'coupled') ssnd(jps_ficet)%laction = .TRUE. 802 801 803 802 SELECT CASE ( TRIM( sn_snd_thick%cldes ) ) … … 805 804 CASE( 'ice and snow' ) 806 805 ssnd(jps_hice:jps_hsnw)%laction = .TRUE. 807 IF 806 IF( TRIM( sn_snd_thick%clcat ) == 'yes' ) THEN 808 807 ssnd(jps_hice:jps_hsnw)%nct = nn_cats_cpl 809 808 ENDIF 810 809 CASE ( 'weighted ice and snow' ) 811 810 ssnd(jps_hice:jps_hsnw)%laction = .TRUE. 812 IF 811 IF( TRIM( sn_snd_thick%clcat ) == 'yes' ) ssnd(jps_hice:jps_hsnw)%nct = nn_cats_cpl 813 812 CASE default ; CALL ctl_stop( 'sbc_cpl_init: wrong definition of sn_snd_thick%cldes' ) 814 813 END SELECT … … 827 826 ssnd(jps_a_p)%laction = .TRUE. 828 827 ssnd(jps_ht_p)%laction = .TRUE. 829 IF 828 IF( TRIM( sn_snd_mpnd%clcat ) == 'yes' ) THEN 830 829 ssnd(jps_a_p)%nct = nn_cats_cpl 831 830 ssnd(jps_ht_p)%nct = nn_cats_cpl 832 831 ELSE 833 IF 832 IF( nn_cats_cpl > 1 ) THEN 834 833 CALL ctl_stop( 'sbc_cpl_init: use weighted ice option for sn_snd_mpnd%cldes if not exchanging category fields' ) 835 834 ENDIF … … 838 837 ssnd(jps_a_p)%laction = .TRUE. 839 838 ssnd(jps_ht_p)%laction = .TRUE. 840 IF 839 IF( TRIM( sn_snd_mpnd%clcat ) == 'yes' ) THEN 841 840 ssnd(jps_a_p)%nct = nn_cats_cpl 842 841 ssnd(jps_ht_p)%nct = nn_cats_cpl … … 913 912 CASE ( 'ice only' ) 914 913 ssnd(jps_ttilyr)%laction = .TRUE. 915 IF 914 IF( TRIM( sn_snd_ttilyr%clcat ) == 'yes' ) THEN 916 915 ssnd(jps_ttilyr)%nct = nn_cats_cpl 917 916 ELSE 918 IF 917 IF( nn_cats_cpl > 1 ) THEN 919 918 CALL ctl_stop( 'sbc_cpl_init: use weighted ice option for sn_snd_ttilyr%cldes if not exchanging category fields' ) 920 919 ENDIF … … 922 921 CASE ( 'weighted ice' ) 923 922 ssnd(jps_ttilyr)%laction = .TRUE. 924 IF 923 IF( TRIM( sn_snd_ttilyr%clcat ) == 'yes' ) ssnd(jps_ttilyr)%nct = nn_cats_cpl 925 924 CASE default ; CALL ctl_stop( 'sbc_cpl_init: wrong definition of sn_snd_ttilyr%cldes;'//sn_snd_ttilyr%cldes ) 926 925 END SELECT … … 932 931 CASE ( 'ice only' ) 933 932 ssnd(jps_kice)%laction = .TRUE. 934 IF 933 IF( TRIM( sn_snd_cond%clcat ) == 'yes' ) THEN 935 934 ssnd(jps_kice)%nct = nn_cats_cpl 936 935 ELSE 937 IF 936 IF( nn_cats_cpl > 1 ) THEN 938 937 CALL ctl_stop( 'sbc_cpl_init: use weighted ice option for sn_snd_cond%cldes if not exchanging category fields' ) 939 938 ENDIF … … 941 940 CASE ( 'weighted ice' ) 942 941 ssnd(jps_kice)%laction = .TRUE. 943 IF 942 IF( TRIM( sn_snd_cond%clcat ) == 'yes' ) ssnd(jps_kice)%nct = nn_cats_cpl 944 943 CASE default ; CALL ctl_stop( 'sbc_cpl_init: wrong definition of sn_snd_cond%cldes;'//sn_snd_cond%cldes ) 945 944 END SELECT … … 1002 1001 ! for example O_SSTSST sent by OPA to SAS and therefore S_SSTSST sent by SAS to the Atmosphere 1003 1002 DO jn = 1, jpsnd 1004 IF 1003 IF( ssnd(jn)%clname(1:1) == "O" ) ssnd(jn)%clname = "S"//ssnd(jn)%clname(2:LEN(ssnd(jn)%clname)) 1005 1004 END DO 1006 1005 ! … … 1029 1028 CALL cpl_define(jprcv, jpsnd, nn_cplmodel) 1030 1029 1031 IF 1030 IF(ln_usecplmask) THEN 1032 1031 xcplmask(:,:,:) = 0. 1033 1032 CALL iom_open( 'cplmask', inum ) … … 1266 1265 1267 1266 IF( kt == nit000 ) ssh_ibb(:,:) = ssh_ib(:,:) ! correct this later (read from restart if possible) 1268 END 1267 ENDIF 1269 1268 ! 1270 1269 IF( ln_sdw ) THEN ! Stokes Drift correction activated … … 1419 1418 ELSE IF( srcv(jpr_qnsmix)%laction ) THEN ; zqns(:,:) = frcv(jpr_qnsmix)%z3(:,:,1) 1420 1419 ELSE ; zqns(:,:) = 0._wp 1421 END 1420 ENDIF 1422 1421 ! update qns over the free ocean with: 1423 1422 IF( nn_components /= jp_iam_opa ) THEN … … 1691 1690 ! --- evaporation over ice (kg/m2/s) --- ! 1692 1691 DO jl=1,jpl 1693 IF 1692 IF(sn_rcv_emp%clcat == 'yes') THEN ; zevap_ice(:,:,jl) = frcv(jpr_ievp)%z3(:,:,jl) 1694 1693 ELSE ; zevap_ice(:,:,jl) = frcv(jpr_ievp)%z3(:,:,1 ) ; ENDIF 1695 1694 ENDDO … … 1790 1789 CASE( 'conservative' ) ! the required fields are directly provided 1791 1790 zqns_tot(:,:) = frcv(jpr_qnsmix)%z3(:,:,1) 1792 IF 1791 IF( TRIM(sn_rcv_qns%clcat) == 'yes' ) THEN 1793 1792 zqns_ice(:,:,1:jpl) = frcv(jpr_qnsice)%z3(:,:,1:jpl) 1794 1793 ELSE … … 1799 1798 CASE( 'oce and ice' ) ! the total flux is computed from ocean and ice fluxes 1800 1799 zqns_tot(:,:) = ziceld(:,:) * frcv(jpr_qnsoce)%z3(:,:,1) 1801 IF 1800 IF( TRIM(sn_rcv_qns%clcat) == 'yes' ) THEN 1802 1801 DO jl=1,jpl 1803 1802 zqns_tot(:,: ) = zqns_tot(:,:) + a_i(:,:,jl) * frcv(jpr_qnsice)%z3(:,:,jl) … … 1901 1900 #endif 1902 1901 ! outputs 1903 IF 1904 IF 1905 IF 1906 IF 1902 IF( srcv(jpr_cal)%laction ) CALL iom_put('hflx_cal_cea' , - frcv(jpr_cal)%z3(:,:,1) * rLfus ) ! latent heat from calving 1903 IF( srcv(jpr_icb)%laction ) CALL iom_put('hflx_icb_cea' , - frcv(jpr_icb)%z3(:,:,1) * rLfus ) ! latent heat from icebergs melting 1904 IF( iom_use('hflx_rain_cea') ) CALL iom_put('hflx_rain_cea' , ( tprecip(:,:) - sprecip(:,:) ) * zcptrain(:,:) ) ! heat flux from rain (cell average) 1905 IF( iom_use('hflx_evap_cea') ) CALL iom_put('hflx_evap_cea' , ( frcv(jpr_tevp)%z3(:,:,1) - frcv(jpr_ievp)%z3(:,:,1) & 1907 1906 & * picefr(:,:) ) * zcptn(:,:) * tmask(:,:,1) ) ! heat flux from evap (cell average) 1908 IF 1909 IF 1907 IF( iom_use('hflx_snow_cea') ) CALL iom_put('hflx_snow_cea' , sprecip(:,:) * ( zcptsnw(:,:) - rLfus ) ) ! heat flux from snow (cell average) 1908 IF( iom_use('hflx_snow_ao_cea') ) CALL iom_put('hflx_snow_ao_cea', sprecip(:,:) * ( zcptsnw(:,:) - rLfus ) & 1910 1909 & * ( 1._wp - zsnw(:,:) ) ) ! heat flux from snow (over ocean) 1911 IF 1910 IF( iom_use('hflx_snow_ai_cea') ) CALL iom_put('hflx_snow_ai_cea', sprecip(:,:) * ( zcptsnw(:,:) - rLfus ) & 1912 1911 & * zsnw(:,:) ) ! heat flux from snow (over ice) 1913 1912 ! note: hflx for runoff and iceshelf are done in sbcrnf and sbcisf resp. … … 1920 1919 CASE( 'conservative' ) 1921 1920 zqsr_tot(:,: ) = frcv(jpr_qsrmix)%z3(:,:,1) 1922 IF 1921 IF( TRIM(sn_rcv_qsr%clcat) == 'yes' ) THEN 1923 1922 zqsr_ice(:,:,1:jpl) = frcv(jpr_qsrice)%z3(:,:,1:jpl) 1924 1923 ELSE … … 1932 1931 CASE( 'oce and ice' ) 1933 1932 zqsr_tot(:,: ) = ziceld(:,:) * frcv(jpr_qsroce)%z3(:,:,1) 1934 IF 1933 IF( TRIM(sn_rcv_qsr%clcat) == 'yes' ) THEN 1935 1934 DO jl = 1, jpl 1936 1935 zqsr_tot(:,: ) = zqsr_tot(:,:) + a_i(:,:,jl) * frcv(jpr_qsrice)%z3(:,:,jl) … … 1988 1987 ! ! ========================= ! 1989 1988 CASE ('coupled') 1990 IF 1989 IF( TRIM(sn_rcv_dqnsdt%clcat) == 'yes' ) THEN 1991 1990 zdqns_ice(:,:,1:jpl) = frcv(jpr_dqnsdt)%z3(:,:,1:jpl) 1992 1991 ELSE … … 2067 2066 IF( ssnd(jps_toce)%laction .OR. ssnd(jps_tice)%laction .OR. ssnd(jps_tmix)%laction ) THEN 2068 2067 2069 IF 2068 IF( nn_components == jp_iam_opa ) THEN 2070 2069 ztmp1(:,:) = ts(:,:,1,jp_tem,Kmm) ! send temperature as it is (potential or conservative) -> use of l_useCT on the received part 2071 2070 ELSE … … 2472 2471 IF( ssnd(jps_ficet)%laction ) THEN 2473 2472 CALL cpl_snd( jps_ficet, isec, RESHAPE ( fr_i, (/jpi,jpj,1/) ), info ) 2474 END 2473 ENDIF 2475 2474 ! ! ------------------------- ! 2476 2475 ! ! Water levels to waves ! … … 2487 2486 ENDIF 2488 2487 CALL cpl_snd( jps_wlev , isec, RESHAPE ( ztmp1, (/jpi,jpj,1/) ), info ) 2489 END 2488 ENDIF 2490 2489 ! 2491 2490 ! Fields sent by OPA to SAS when doing OPA<->SAS coupling -
NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/SBC/sbcdcy.F90
r10425 r12182 7 7 !! NEMO 2.0 ! 2006-02 (S. Masson, G. Madec) adaptation to NEMO 8 8 !! 3.1 ! 2009-07 (J.M. Molines) adaptation to v3.1 9 !! 4.* ! 2019-10 (L. Brodeau) nothing really new, but the routine 10 !! ! "sbc_dcy_param" has been extracted from old function "sbc_dcy" 11 !! ! => this allows the warm-layer param of COARE3* to know the time 12 !! ! of dawn and dusk even if "ln_dm2dc=.false." (rdawn_dcy & rdusk_dcy 13 !! ! are now public) 9 14 !!---------------------------------------------------------------------- 10 15 … … 22 27 IMPLICIT NONE 23 28 PRIVATE 24 29 25 30 INTEGER, PUBLIC :: nday_qsr !: day when parameters were computed 26 31 27 32 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: raa , rbb , rcc , rab ! diurnal cycle parameters 28 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: rtmd, rdawn, rdusk, rscal ! - - - 29 33 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: rtmd, rscal ! - - - 34 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:), PUBLIC :: rdawn_dcy, rdusk_dcy ! - - - 35 30 36 PUBLIC sbc_dcy ! routine called by sbc 37 PUBLIC sbc_dcy_param ! routine used here and called by warm-layer parameterization (sbcblk_skin_coare*) 31 38 32 39 !!---------------------------------------------------------------------- 33 40 !! NEMO/OCE 4.0 , NEMO Consortium (2018) 34 !! $Id$ 41 !! $Id$ 35 42 !! Software governed by the CeCILL license (see ./LICENSE) 36 43 !!---------------------------------------------------------------------- 37 44 CONTAINS 38 45 39 40 41 42 43 44 & rtmd(jpi,jpj) , rdawn(jpi,jpj) , rdusk(jpi,jpj) , rscal(jpi,jpj) , STAT=sbc_dcy_alloc )45 46 47 48 46 INTEGER FUNCTION sbc_dcy_alloc() 47 !!---------------------------------------------------------------------- 48 !! *** FUNCTION sbc_dcy_alloc *** 49 !!---------------------------------------------------------------------- 50 ALLOCATE( raa (jpi,jpj) , rbb (jpi,jpj) , rcc (jpi,jpj) , rab (jpi,jpj) , & 51 & rtmd(jpi,jpj) , rdawn_dcy(jpi,jpj) , rdusk_dcy(jpi,jpj) , rscal(jpi,jpj) , STAT=sbc_dcy_alloc ) 52 ! 53 CALL mpp_sum ( 'sbcdcy', sbc_dcy_alloc ) 54 IF( sbc_dcy_alloc /= 0 ) CALL ctl_stop( 'STOP', 'sbc_dcy_alloc: failed to allocate arrays' ) 55 END FUNCTION sbc_dcy_alloc 49 56 50 57 … … 60 67 !! 61 68 !! reference : Bernie, DJ, E Guilyardi, G Madec, JM Slingo, and SJ Woolnough, 2007 62 !! Impact of resolving the diurnal cycle in an ocean--atmosphere GCM. 69 !! Impact of resolving the diurnal cycle in an ocean--atmosphere GCM. 63 70 !! Part 1: a diurnally forced OGCM. Climate Dynamics 29:6, 575-590. 64 71 !!---------------------------------------------------------------------- 65 72 LOGICAL , OPTIONAL , INTENT(in) :: l_mask ! use the routine for night mask computation 66 REAL(wp), DIMENSION(jpi,jpj), INTENT(in) :: pqsrin ! input daily QSR flux 73 REAL(wp), DIMENSION(jpi,jpj), INTENT(in) :: pqsrin ! input daily QSR flux 67 74 REAL(wp), DIMENSION(jpi,jpj) :: zqsrout ! output QSR flux with diurnal cycle 68 75 !! 69 76 INTEGER :: ji, jj ! dummy loop indices 70 77 INTEGER, DIMENSION(jpi,jpj) :: imask_night ! night mask 71 REAL(wp) :: ztwopi, zinvtwopi, zconvrad72 78 REAL(wp) :: zlo, zup, zlousd, zupusd 73 REAL(wp) :: zdsws, zdecrad, ztx, zsin, zcos 74 REAL(wp) :: ztmp, ztmp1, ztmp2, ztest 79 REAL(wp) :: ztmp, ztmp1, ztmp2 75 80 REAL(wp) :: ztmpm, ztmpm1, ztmpm2 76 !---------------------------statement functions------------------------77 REAL(wp) :: fintegral, pt1, pt2, paaa, pbbb, pccc ! dummy statement function arguments78 fintegral( pt1, pt2, paaa, pbbb, pccc ) = &79 & paaa * pt2 + zinvtwopi * pbbb * SIN(pccc + ztwopi * pt2) &80 & - paaa * pt1 - zinvtwopi * pbbb * SIN(pccc + ztwopi * pt1)81 81 !!--------------------------------------------------------------------- 82 82 ! 83 83 ! Initialization 84 84 ! -------------- 85 ztwopi = 2._wp * rpi86 zinvtwopi = 1._wp / ztwopi87 zconvrad = ztwopi / 360._wp88 89 85 ! When are we during the day (from 0 to 1) 90 86 zlo = ( REAL(nsec_day, wp) - 0.5_wp * rdt ) / rday 91 87 zup = zlo + ( REAL(nn_fsbc, wp) * rdt ) / rday 92 ! 93 IF( nday_qsr == -1 ) THEN ! first time step only 88 ! 89 IF( nday_qsr == -1 ) THEN ! first time step only 94 90 IF(lwp) THEN 95 91 WRITE(numout,*) … … 98 94 WRITE(numout,*) 99 95 ENDIF 96 ENDIF 97 98 ! Setting parameters for each new day: 99 CALL sbc_dcy_param() 100 101 !CALL iom_put( "rdusk_dcy", rdusk_dcy(:,:)*tmask(:,:,1) ) !LB 102 !CALL iom_put( "rdawn_dcy", rdawn_dcy(:,:)*tmask(:,:,1) ) !LB 103 !CALL iom_put( "rscal_dcy", rscal(:,:)*tmask(:,:,1) ) !LB 104 105 106 ! 3. update qsr with the diurnal cycle 107 ! ------------------------------------ 108 109 imask_night(:,:) = 0 110 DO jj = 1, jpj 111 DO ji = 1, jpi 112 ztmpm = 0._wp 113 IF( ABS(rab(ji,jj)) < 1. ) THEN ! day duration is less than 24h 114 ! 115 IF( rdawn_dcy(ji,jj) < rdusk_dcy(ji,jj) ) THEN ! day time in one part 116 zlousd = MAX(zlo, rdawn_dcy(ji,jj)) 117 zlousd = MIN(zlousd, zup) 118 zupusd = MIN(zup, rdusk_dcy(ji,jj)) 119 zupusd = MAX(zupusd, zlo) 120 ztmp = fintegral(zlousd, zupusd, raa(ji,jj), rbb(ji,jj), rcc(ji,jj)) 121 zqsrout(ji,jj) = pqsrin(ji,jj) * ztmp * rscal(ji,jj) 122 ztmpm = zupusd - zlousd 123 IF( ztmpm .EQ. 0 ) imask_night(ji,jj) = 1 124 ! 125 ELSE ! day time in two parts 126 zlousd = MIN(zlo, rdusk_dcy(ji,jj)) 127 zupusd = MIN(zup, rdusk_dcy(ji,jj)) 128 ztmp1 = fintegral(zlousd, zupusd, raa(ji,jj), rbb(ji,jj), rcc(ji,jj)) 129 ztmpm1=zupusd-zlousd 130 zlousd = MAX(zlo, rdawn_dcy(ji,jj)) 131 zupusd = MAX(zup, rdawn_dcy(ji,jj)) 132 ztmp2 = fintegral(zlousd, zupusd, raa(ji,jj), rbb(ji,jj), rcc(ji,jj)) 133 ztmpm2 =zupusd-zlousd 134 ztmp = ztmp1 + ztmp2 135 ztmpm = ztmpm1 + ztmpm2 136 zqsrout(ji,jj) = pqsrin(ji,jj) * ztmp * rscal(ji,jj) 137 IF(ztmpm .EQ. 0.) imask_night(ji,jj) = 1 138 ENDIF 139 ELSE ! 24h light or 24h night 140 ! 141 IF( raa(ji,jj) > rbb(ji,jj) ) THEN ! 24h day 142 ztmp = fintegral(zlo, zup, raa(ji,jj), rbb(ji,jj), rcc(ji,jj)) 143 zqsrout(ji,jj) = pqsrin(ji,jj) * ztmp * rscal(ji,jj) 144 imask_night(ji,jj) = 0 145 ! 146 ELSE ! No day 147 zqsrout(ji,jj) = 0.0_wp 148 imask_night(ji,jj) = 1 149 ENDIF 150 ENDIF 151 END DO 152 END DO 153 ! 154 IF( PRESENT(l_mask) .AND. l_mask ) THEN 155 zqsrout(:,:) = float(imask_night(:,:)) 156 ENDIF 157 ! 158 END FUNCTION sbc_dcy 159 160 161 SUBROUTINE sbc_dcy_param( ) 162 !! 163 INTEGER :: ji, jj ! dummy loop indices 164 !INTEGER, DIMENSION(jpi,jpj) :: imask_night ! night mask 165 REAL(wp) :: zdsws, zdecrad, ztx, zsin, zcos 166 REAL(wp) :: ztmp, ztest 167 !---------------------------statement functions------------------------ 168 ! 169 IF( nday_qsr == -1 ) THEN ! first time step only 100 170 ! allocate sbcdcy arrays 101 171 IF( sbc_dcy_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'sbc_dcy_alloc : unable to allocate arrays' ) 102 172 ! Compute rcc needed to compute the time integral of the diurnal cycle 103 rcc(:,:) = zconvrad * glamt(:,:) - rpi173 rcc(:,:) = rad * glamt(:,:) - rpi 104 174 ! time of midday 105 175 rtmd(:,:) = 0.5_wp - glamt(:,:) / 360._wp … … 107 177 ENDIF 108 178 109 ! If this is a new day, we have to update the dawn, dusk and scaling function 179 ! If this is a new day, we have to update the dawn, dusk and scaling function 110 180 !---------------------- 111 112 ! 2.1 dawn and dusk 113 114 ! nday is the number of days since the beginning of the current month 115 IF( nday_qsr /= nday ) THEN 181 182 ! 2.1 dawn and dusk 183 184 ! nday is the number of days since the beginning of the current month 185 IF( nday_qsr /= nday ) THEN 116 186 ! save the day of the year and the daily mean of qsr 117 nday_qsr = nday 118 ! number of days since the previous winter solstice (supposed to be always 21 December) 187 nday_qsr = nday 188 ! number of days since the previous winter solstice (supposed to be always 21 December) 119 189 zdsws = REAL(11 + nday_year, wp) 120 190 ! declination of the earths orbit 121 zdecrad = (-23.5_wp * zconvrad) * COS( zdsws * ztwopi / REAL(nyear_len(1),wp) )191 zdecrad = (-23.5_wp * rad) * COS( zdsws * 2._wp*rpi / REAL(nyear_len(1),wp) ) 122 192 ! Compute A and B needed to compute the time integral of the diurnal cycle 123 193 … … 125 195 DO jj = 1, jpj 126 196 DO ji = 1, jpi 127 ztmp = zconvrad * gphit(ji,jj)197 ztmp = rad * gphit(ji,jj) 128 198 raa(ji,jj) = SIN( ztmp ) * zsin 129 199 rbb(ji,jj) = COS( ztmp ) * zcos 130 END DO 131 END DO 200 END DO 201 END DO 132 202 ! Compute the time of dawn and dusk 133 203 134 ! rab to test if the day time is equal to 0, less than 24h of full day 204 ! rab to test if the day time is equal to 0, less than 24h of full day 135 205 rab(:,:) = -raa(:,:) / rbb(:,:) 136 206 DO jj = 1, jpj 137 207 DO ji = 1, jpi 138 IF 139 ! When is it night?140 ztx = zinvtwopi* (ACOS(rab(ji,jj)) - rcc(ji,jj))141 ztest = -rbb(ji,jj) * SIN( rcc(ji,jj) + ztwopi * ztx )142 ! is it dawn or dusk?143 IF 144 rdawn (ji,jj) = ztx145 rdusk (ji,jj) = rtmd(ji,jj) + ( rtmd(ji,jj) - rdawn(ji,jj) )208 IF( ABS(rab(ji,jj)) < 1._wp ) THEN ! day duration is less than 24h 209 ! When is it night? 210 ztx = 1._wp/(2._wp*rpi) * (ACOS(rab(ji,jj)) - rcc(ji,jj)) 211 ztest = -rbb(ji,jj) * SIN( rcc(ji,jj) + 2._wp*rpi * ztx ) 212 ! is it dawn or dusk? 213 IF( ztest > 0._wp ) THEN 214 rdawn_dcy(ji,jj) = ztx 215 rdusk_dcy(ji,jj) = rtmd(ji,jj) + ( rtmd(ji,jj) - rdawn_dcy(ji,jj) ) 146 216 ELSE 147 rdusk (ji,jj) = ztx148 rdawn (ji,jj) = rtmd(ji,jj) - ( rdusk(ji,jj) - rtmd(ji,jj) )217 rdusk_dcy(ji,jj) = ztx 218 rdawn_dcy(ji,jj) = rtmd(ji,jj) - ( rdusk_dcy(ji,jj) - rtmd(ji,jj) ) 149 219 ENDIF 150 220 ELSE 151 rdawn (ji,jj) = rtmd(ji,jj) + 0.5_wp152 rdusk (ji,jj) = rdawn(ji,jj)153 ENDIF 154 END DO155 END DO 156 rdawn (:,:) = MOD( (rdawn(:,:) + 1._wp), 1._wp )157 rdusk (:,:) = MOD( (rdusk(:,:) + 1._wp), 1._wp )221 rdawn_dcy(ji,jj) = rtmd(ji,jj) + 0.5_wp 222 rdusk_dcy(ji,jj) = rdawn_dcy(ji,jj) 223 ENDIF 224 END DO 225 END DO 226 rdawn_dcy(:,:) = MOD( (rdawn_dcy(:,:) + 1._wp), 1._wp ) 227 rdusk_dcy(:,:) = MOD( (rdusk_dcy(:,:) + 1._wp), 1._wp ) 158 228 ! 2.2 Compute the scaling function: 159 229 ! S* = the inverse of the time integral of the diurnal cycle from dawn to dusk … … 162 232 DO jj = 1, jpj 163 233 DO ji = 1, jpi 164 IF 234 IF( ABS(rab(ji,jj)) < 1._wp ) THEN ! day duration is less than 24h 165 235 rscal(ji,jj) = 0.0_wp 166 IF ( rdawn(ji,jj) < rdusk(ji,jj) ) THEN ! day time in one part167 IF( (rdusk (ji,jj) - rdawn(ji,jj) ) .ge. 0.001_wp ) THEN168 rscal(ji,jj) = fintegral(rdawn(ji,jj), rdusk(ji,jj), raa(ji,jj), rbb(ji,jj), rcc(ji,jj))169 rscal(ji,jj) = 1._wp / rscal(ji,jj)236 IF( rdawn_dcy(ji,jj) < rdusk_dcy(ji,jj) ) THEN ! day time in one part 237 IF( (rdusk_dcy(ji,jj) - rdawn_dcy(ji,jj) ) .ge. 0.001_wp ) THEN 238 rscal(ji,jj) = fintegral(rdawn_dcy(ji,jj), rdusk_dcy(ji,jj), raa(ji,jj), rbb(ji,jj), rcc(ji,jj)) 239 rscal(ji,jj) = 1._wp / rscal(ji,jj) 170 240 ENDIF 171 241 ELSE ! day time in two parts 172 IF( (rdusk (ji,jj) + (1._wp - rdawn(ji,jj)) ) .ge. 0.001_wp ) THEN173 rscal(ji,jj) = fintegral(0._wp, rdusk(ji,jj), raa(ji,jj), rbb(ji,jj), rcc(ji,jj)) &174 & + fintegral(rdawn(ji,jj), 1._wp, raa(ji,jj), rbb(ji,jj), rcc(ji,jj))175 rscal(ji,jj) = 1. / rscal(ji,jj)242 IF( (rdusk_dcy(ji,jj) + (1._wp - rdawn_dcy(ji,jj)) ) .ge. 0.001_wp ) THEN 243 rscal(ji,jj) = fintegral(0._wp, rdusk_dcy(ji,jj), raa(ji,jj), rbb(ji,jj), rcc(ji,jj)) & 244 & + fintegral(rdawn_dcy(ji,jj), 1._wp, raa(ji,jj), rbb(ji,jj), rcc(ji,jj)) 245 rscal(ji,jj) = 1. / rscal(ji,jj) 176 246 ENDIF 177 247 ENDIF 178 248 ELSE 179 IF 180 rscal(ji,jj) = fintegral(0._wp, 1._wp, raa(ji,jj), rbb(ji,jj), rcc(ji,jj)) 249 IF( raa(ji,jj) > rbb(ji,jj) ) THEN ! 24h day 250 rscal(ji,jj) = fintegral(0._wp, 1._wp, raa(ji,jj), rbb(ji,jj), rcc(ji,jj)) 181 251 rscal(ji,jj) = 1._wp / rscal(ji,jj) 182 252 ELSE ! No day … … 184 254 ENDIF 185 255 ENDIF 186 END DO 187 END DO 256 END DO 257 END DO 188 258 ! 189 259 ztmp = rday / ( rdt * REAL(nn_fsbc, wp) ) 190 260 rscal(:,:) = rscal(:,:) * ztmp 191 261 ! 192 ENDIF 193 ! 3. update qsr with the diurnal cycle 194 ! ------------------------------------ 195 196 imask_night(:,:) = 0 197 DO jj = 1, jpj 198 DO ji = 1, jpi 199 ztmpm = 0._wp 200 IF( ABS(rab(ji,jj)) < 1. ) THEN ! day duration is less than 24h 201 ! 202 IF( rdawn(ji,jj) < rdusk(ji,jj) ) THEN ! day time in one part 203 zlousd = MAX(zlo, rdawn(ji,jj)) 204 zlousd = MIN(zlousd, zup) 205 zupusd = MIN(zup, rdusk(ji,jj)) 206 zupusd = MAX(zupusd, zlo) 207 ztmp = fintegral(zlousd, zupusd, raa(ji,jj), rbb(ji,jj), rcc(ji,jj)) 208 zqsrout(ji,jj) = pqsrin(ji,jj) * ztmp * rscal(ji,jj) 209 ztmpm = zupusd - zlousd 210 IF ( ztmpm .EQ. 0 ) imask_night(ji,jj) = 1 211 ! 212 ELSE ! day time in two parts 213 zlousd = MIN(zlo, rdusk(ji,jj)) 214 zupusd = MIN(zup, rdusk(ji,jj)) 215 ztmp1 = fintegral(zlousd, zupusd, raa(ji,jj), rbb(ji,jj), rcc(ji,jj)) 216 ztmpm1=zupusd-zlousd 217 zlousd = MAX(zlo, rdawn(ji,jj)) 218 zupusd = MAX(zup, rdawn(ji,jj)) 219 ztmp2 = fintegral(zlousd, zupusd, raa(ji,jj), rbb(ji,jj), rcc(ji,jj)) 220 ztmpm2 =zupusd-zlousd 221 ztmp = ztmp1 + ztmp2 222 ztmpm = ztmpm1 + ztmpm2 223 zqsrout(ji,jj) = pqsrin(ji,jj) * ztmp * rscal(ji,jj) 224 IF (ztmpm .EQ. 0.) imask_night(ji,jj) = 1 225 ENDIF 226 ELSE ! 24h light or 24h night 227 ! 228 IF( raa(ji,jj) > rbb(ji,jj) ) THEN ! 24h day 229 ztmp = fintegral(zlo, zup, raa(ji,jj), rbb(ji,jj), rcc(ji,jj)) 230 zqsrout(ji,jj) = pqsrin(ji,jj) * ztmp * rscal(ji,jj) 231 imask_night(ji,jj) = 0 232 ! 233 ELSE ! No day 234 zqsrout(ji,jj) = 0.0_wp 235 imask_night(ji,jj) = 1 236 ENDIF 237 ENDIF 238 END DO 239 END DO 240 ! 241 IF( PRESENT(l_mask) .AND. l_mask ) THEN 242 zqsrout(:,:) = float(imask_night(:,:)) 243 ENDIF 244 ! 245 END FUNCTION sbc_dcy 262 ENDIF !IF( nday_qsr /= nday ) 263 ! 264 END SUBROUTINE sbc_dcy_param 265 266 267 FUNCTION fintegral( pt1, pt2, paaa, pbbb, pccc ) 268 REAL(wp), INTENT(in) :: pt1, pt2, paaa, pbbb, pccc 269 REAL(wp) :: fintegral 270 fintegral = paaa * pt2 + 1._wp/(2._wp*rpi) * pbbb * SIN(pccc + 2._wp*rpi*pt2) & 271 & - paaa * pt1 - 1._wp/(2._wp*rpi) * pbbb * SIN(pccc + 2._wp*rpi*pt1) 272 END FUNCTION fintegral 246 273 247 274 !!====================================================================== -
NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/SBC/sbcice_cice.F90
r11960 r12182 132 132 IF ( ksbc == jp_flx ) THEN 133 133 CALL cice_sbc_force(kt) 134 ELSE IF 134 ELSE IF( ksbc == jp_purecpl ) THEN 135 135 CALL sbc_cpl_ice_flx( fr_i ) 136 136 ENDIF … … 140 140 CALL cice_sbc_out ( kt, ksbc ) 141 141 142 IF 142 IF( ksbc == jp_purecpl ) CALL cice_sbc_hadgam(kt+1) 143 143 144 144 ENDIF ! End sea-ice time step only … … 169 169 ! there is no restart file. 170 170 ! Values from a CICE restart file would overwrite this 171 IF 171 IF( .NOT. ln_rstart ) THEN 172 172 CALL nemo2cice( ts(:,:,1,jp_tem,Kmm) , sst , 'T' , 1.) 173 173 ENDIF … … 178 178 179 179 ! Do some CICE consistency checks 180 IF 181 IF 180 IF( (ksbc == jp_flx) .OR. (ksbc == jp_purecpl) ) THEN 181 IF( calc_strair .OR. calc_Tsfc ) THEN 182 182 CALL ctl_stop( 'STOP', 'cice_sbc_init : Forcing option requires calc_strair=F and calc_Tsfc=F in ice_in' ) 183 183 ENDIF 184 ELSEIF 185 IF 184 ELSEIF(ksbc == jp_blk) THEN 185 IF( .NOT. (calc_strair .AND. calc_Tsfc) ) THEN 186 186 CALL ctl_stop( 'STOP', 'cice_sbc_init : Forcing option requires calc_strair=T and calc_Tsfc=T in ice_in' ) 187 187 ENDIF … … 203 203 204 204 CALL cice2nemo(aice,fr_i, 'T', 1. ) 205 IF 205 IF( (ksbc == jp_flx) .OR. (ksbc == jp_purecpl) ) THEN 206 206 DO jl=1,ncat 207 207 CALL cice2nemo(aicen(:,:,jl,:),a_i(:,:,jl), 'T', 1. ) … … 298 298 ! forced and coupled case 299 299 300 IF 300 IF( (ksbc == jp_flx).OR.(ksbc == jp_purecpl) ) THEN 301 301 302 302 ztmpn(:,:,:)=0.0 … … 323 323 324 324 ! Surface downward latent heat flux (CI_5) 325 IF 325 IF(ksbc == jp_flx) THEN 326 326 DO jl=1,ncat 327 327 ztmpn(:,:,jl)=qla_ice(:,:,1)*a_i(:,:,jl) … … 333 333 DO jj=1,jpj 334 334 DO ji=1,jpi 335 IF 335 IF(fr_i(ji,jj).eq.0.0) THEN 336 336 DO jl=1,ncat 337 337 ztmpn(ji,jj,jl)=0.0 … … 352 352 ! GBM conductive flux through ice (CI_6) 353 353 ! Convert to GBM 354 IF 354 IF(ksbc == jp_flx) THEN 355 355 ztmp(:,:) = botmelt(:,:,jl)*a_i(:,:,jl) 356 356 ELSE … … 361 361 ! GBM surface heat flux (CI_7) 362 362 ! Convert to GBM 363 IF 363 IF(ksbc == jp_flx) THEN 364 364 ztmp(:,:) = (topmelt(:,:,jl)+botmelt(:,:,jl))*a_i(:,:,jl) 365 365 ELSE … … 369 369 ENDDO 370 370 371 ELSE IF 371 ELSE IF(ksbc == jp_blk) THEN 372 372 373 373 ! Pass bulk forcing fields to CICE (which will calculate heat fluxes etc itself) … … 547 547 ! Freshwater fluxes 548 548 549 IF 549 IF(ksbc == jp_flx) THEN 550 550 ! Note that emp from the forcing files is evap*(1-aice)-(tprecip-aice*sprecip) 551 551 ! What we want here is evap*(1-aice)-tprecip*(1-aice) hence manipulation below … … 553 553 ! Better to use evap and tprecip? (but for now don't read in evap in this case) 554 554 emp(:,:) = emp(:,:)+fr_i(:,:)*(tprecip(:,:)-sprecip(:,:)) 555 ELSE IF 555 ELSE IF(ksbc == jp_blk) THEN 556 556 emp(:,:) = (1.0-fr_i(:,:))*emp(:,:) 557 ELSE IF 557 ELSE IF(ksbc == jp_purecpl) THEN 558 558 ! emp_tot is set in sbc_cpl_ice_flx (called from cice_sbc_in above) 559 559 ! This is currently as required with the coupling fields from the UM atmosphere … … 585 585 ! Scale qsr and qns according to ice fraction (bulk formulae only) 586 586 587 IF 587 IF(ksbc == jp_blk) THEN 588 588 qsr(:,:)=qsr(:,:)*(1.0-fr_i(:,:)) 589 589 qns(:,:)=qns(:,:)*(1.0-fr_i(:,:)) 590 590 ENDIF 591 591 ! Take into account snow melting except for fully coupled when already in qns_tot 592 IF 592 IF(ksbc == jp_purecpl) THEN 593 593 qsr(:,:)= qsr_tot(:,:) 594 594 qns(:,:)= qns_tot(:,:) … … 625 625 626 626 CALL cice2nemo(aice,fr_i,'T', 1. ) 627 IF 627 IF( (ksbc == jp_flx).OR.(ksbc == jp_purecpl) ) THEN 628 628 DO jl=1,ncat 629 629 CALL cice2nemo(aicen(:,:,jl,:),a_i(:,:,jl), 'T', 1. ) … … 878 878 ! B. Gather pn into global array (png) 879 879 880 IF 880 IF( jpnij > 1) THEN 881 881 CALL mppsync 882 882 CALL mppgather (pn,0,png) … … 891 891 ! (may be OK but not 100% sure) 892 892 893 IF 893 IF(nproc==0) THEN 894 894 ! pcg(:,:)=0.0 895 895 DO jn=1,jpnij … … 1014 1014 ! the lbclnk call on pn will replace these with sensible values 1015 1015 1016 IF 1016 IF(nproc==0) THEN 1017 1017 png(:,:,:)=0.0 1018 1018 DO jn=1,jpnij … … 1027 1027 ! C. Scatter png into NEMO field (pn) for each processor 1028 1028 1029 IF 1029 IF( jpnij > 1) THEN 1030 1030 CALL mppsync 1031 1031 CALL mppscatter (png,0,pn) -
NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/SBC/sbcmod.F90
r12150 r12182 15 15 !! 3.6 ! 2014-11 (P. Mathiot, C. Harris) add ice shelves melting 16 16 !! 4.0 ! 2016-06 (L. Brodeau) new general bulk formulation 17 !! 4.0 ! 2019-03 (F. Lemarié & G. Samson) add ABL compatibility (ln_abl=TRUE) 17 18 !!---------------------------------------------------------------------- 18 19 … … 33 34 USE sbcflx ! surface boundary condition: flux formulation 34 35 USE sbcblk ! surface boundary condition: bulk formulation 36 USE sbcabl ! atmospheric boundary layer 35 37 USE sbcice_if ! surface boundary condition: ice-if sea-ice model 36 38 #if defined key_si3 … … 92 94 LOGICAL :: ll_purecpl, ll_opa, ll_not_nemo ! local logical 93 95 !! 94 NAMELIST/namsbc/ nn_fsbc , &95 & ln_usr , ln_flx , ln_blk, &96 & ln_cpl , ln_mixcpl , nn_components,&97 & nn_ice , ln_ice_embd, &98 & ln_traqsr, ln_dm2dc ,&96 NAMELIST/namsbc/ nn_fsbc , & 97 & ln_usr , ln_flx , ln_blk , ln_abl, & 98 & ln_cpl , ln_mixcpl, nn_components, & 99 & nn_ice , ln_ice_embd, & 100 & ln_traqsr, ln_dm2dc , & 99 101 & ln_rnf , nn_fwb , ln_ssr , ln_apr_dyn, & 100 & ln_wave , ln_cdgw , ln_sdw , ln_tauwoc , ln_stcor,&101 & ln_tauw , nn_lsm 102 & ln_wave , ln_cdgw , ln_sdw , ln_tauwoc , ln_stcor , & 103 & ln_tauw , nn_lsm, nn_sdrift 102 104 !!---------------------------------------------------------------------- 103 105 ! … … 124 126 IF( lk_cice ) nn_ice = 3 125 127 ENDIF 126 #else 127 IF( lk_si3 ) nn_ice = 2 128 IF( lk_cice ) nn_ice = 3 128 !!GS: TBD 129 !#else 130 ! IF( lk_si3 ) nn_ice = 2 131 ! IF( lk_cice ) nn_ice = 3 129 132 #endif 130 133 ! … … 136 139 WRITE(numout,*) ' flux formulation ln_flx = ', ln_flx 137 140 WRITE(numout,*) ' bulk formulation ln_blk = ', ln_blk 141 WRITE(numout,*) ' ABL formulation ln_abl = ', ln_abl 138 142 WRITE(numout,*) ' Type of coupling (Ocean/Ice/Atmosphere) : ' 139 143 WRITE(numout,*) ' ocean-atmosphere coupled formulation ln_cpl = ', ln_cpl … … 223 227 CASE( 1 ) !- Ice-cover climatology ("Ice-if" model) 224 228 CASE( 2 ) !- SI3 ice model 229 IF( .NOT.( ln_blk .OR. ln_cpl .OR. ln_abl .OR. ln_usr ) ) & 230 & CALL ctl_stop( 'sbc_init : SI3 sea-ice model requires ln_blk or ln_cpl or ln_abl or ln_usr = T' ) 225 231 CASE( 3 ) !- CICE ice model 226 IF( .NOT.( ln_blk .OR. ln_cpl ) ) CALL ctl_stop( 'sbc_init : CICE sea-ice model requires ln_blk or ln_cpl = T' ) 227 IF( lk_agrif ) CALL ctl_stop( 'sbc_init : CICE sea-ice model not currently available with AGRIF' ) 232 IF( .NOT.( ln_blk .OR. ln_cpl .OR. ln_abl .OR. ln_usr ) ) & 233 & CALL ctl_stop( 'sbc_init : CICE sea-ice model requires ln_blk or ln_cpl or ln_abl or ln_usr = T' ) 234 IF( lk_agrif ) & 235 & CALL ctl_stop( 'sbc_init : CICE sea-ice model not currently available with AGRIF' ) 228 236 CASE DEFAULT !- not supported 229 237 END SELECT … … 248 256 249 257 ! ! Choice of the Surface Boudary Condition (set nsbc) 258 nday_qsr = -1 ! allow initialization at the 1st call !LB: now warm-layer of COARE* calls "sbc_dcy_param" of sbcdcy.F90! 250 259 IF( ln_dm2dc ) THEN !* daily mean to diurnal cycle 251 nday_qsr = -1 ! allow initialization at the 1st call252 IF( .NOT.( ln_flx .OR. ln_blk ) .AND. nn_components /= jp_iam_opa ) &253 & CALL ctl_stop( 'qsr diurnal cycle from daily values requires a flux or bulkformulation' )260 !LB:nday_qsr = -1 ! allow initialization at the 1st call 261 IF( .NOT.( ln_flx .OR. ln_blk .OR. ln_abl ) .AND. nn_components /= jp_iam_opa ) & 262 & CALL ctl_stop( 'qsr diurnal cycle from daily values requires flux, bulk or abl formulation' ) 254 263 ENDIF 255 264 ! !* Choice of the Surface Boudary Condition … … 264 273 IF( ln_flx ) THEN ; nsbc = jp_flx ; icpt = icpt + 1 ; ENDIF ! flux formulation 265 274 IF( ln_blk ) THEN ; nsbc = jp_blk ; icpt = icpt + 1 ; ENDIF ! bulk formulation 275 IF( ln_abl ) THEN ; nsbc = jp_abl ; icpt = icpt + 1 ; ENDIF ! ABL formulation 266 276 IF( ll_purecpl ) THEN ; nsbc = jp_purecpl ; icpt = icpt + 1 ; ENDIF ! Pure Coupled formulation 267 277 IF( ll_opa ) THEN ; nsbc = jp_none ; icpt = icpt + 1 ; ENDIF ! opa coupling via SAS module … … 275 285 CASE( jp_flx ) ; WRITE(numout,*) ' ==>>> flux formulation' 276 286 CASE( jp_blk ) ; WRITE(numout,*) ' ==>>> bulk formulation' 287 CASE( jp_abl ) ; WRITE(numout,*) ' ==>>> ABL formulation' 277 288 CASE( jp_purecpl ) ; WRITE(numout,*) ' ==>>> pure coupled formulation' 278 289 !!gm abusive use of jp_none ?? ===>>> need to be check and changed by adding a jp_sas parameter … … 325 336 IF( l_sbc_clo ) CALL sbc_clo_init ! closed sea surface initialisation 326 337 ! 327 IF( ln_blk ) CALL sbc_blk_init ! bulk formulae initialization 328 329 IF( ln_ssr ) CALL sbc_ssr_init ! Sea-Surface Restoring initialization 338 IF( ln_blk ) CALL sbc_blk_init ! bulk formulae initialization 339 340 IF( ln_abl ) CALL sbc_abl_init ! Atmospheric Boundary Layer (ABL) 341 342 IF( ln_ssr ) CALL sbc_ssr_init ! Sea-Surface Restoring initialization 330 343 ! 331 344 ! … … 394 407 emp_b (:,:) = emp (:,:) 395 408 sfx_b (:,:) = sfx (:,:) 396 IF 409 IF( ln_rnf ) THEN 397 410 rnf_b (:,: ) = rnf (:,: ) 398 411 rnf_tsc_b(:,:,:) = rnf_tsc(:,:,:) … … 418 431 CASE( jp_flx ) ; CALL sbc_flx ( kt ) ! flux formulation 419 432 CASE( jp_blk ) 420 IF( ll_sas ) CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice, Kbb, Kmm ) ! OPA-SAS coupling: SAS receiving fields from OPA421 CALL sbc_blk ( kt ) 433 IF( ll_sas ) CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice, Kbb, Kmm ) ! OPA-SAS coupling: SAS receiving fields from OPA 434 CALL sbc_blk ( kt ) ! bulk formulation for the ocean 422 435 ! 423 CASE( jp_purecpl ) ; CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice, Kbb, Kmm ) ! pure coupled formulation 436 CASE( jp_abl ) 437 IF( ll_sas ) CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice, Kbb, Kmm ) ! OPA-SAS coupling: SAS receiving fields from OPA 438 CALL sbc_abl ( kt ) ! ABL formulation for the ocean 439 ! 440 CASE( jp_purecpl ) ; CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice, Kbb, Kmm ) ! pure coupled formulation 424 441 CASE( jp_none ) 425 442 IF( ll_opa ) CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice, Kbb, Kmm ) ! OPA-SAS coupling: OPA receiving fields from SAS … … 460 477 !!$!clem: it looks like it is necessary for the north fold (in certain circumstances). Don't know why. 461 478 !!$ CALL lbc_lnk( 'sbcmod', emp, 'T', 1. ) 462 IF 479 IF( ll_wd ) THEN ! If near WAD point limit the flux for now 463 480 zthscl = atanh(rn_wd_sbcfra) ! taper frac default is .999 464 481 zwdht(:,:) = ssh(:,:,Kmm) + ht_0(:,:) - rn_wdmin1 ! do this calc of water … … 492 509 CALL iom_get( numror, jpdom_autoglo, 'utau_b', utau_b, ldxios = lrxios ) ! before i-stress (U-point) 493 510 CALL iom_get( numror, jpdom_autoglo, 'vtau_b', vtau_b, ldxios = lrxios ) ! before j-stress (V-point) 494 CALL iom_get( numror, jpdom_autoglo, 'qns_b' , qns_b, ldxios = lrxios) ! before non solar heat flux (T-point)511 CALL iom_get( numror, jpdom_autoglo, 'qns_b', qns_b, ldxios = lrxios ) ! before non solar heat flux (T-point) 495 512 ! The 3D heat content due to qsr forcing is treated in traqsr 496 513 ! CALL iom_get( numror, jpdom_autoglo, 'qsr_b' , qsr_b, ldxios = lrxios ) ! before solar heat flux (T-point) -
NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/SBC/sbcrnf.F90
r12150 r12182 435 435 ! ! - mixed upstream-centered (ln_traadv_cen2=T) 436 436 ! 437 IF 437 IF( ln_rnf_depth ) CALL ctl_warn( 'sbc_rnf_init: increased mixing turned on but effects may already', & 438 438 & 'be spread through depth by ln_rnf_depth' ) 439 439 ! -
NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/SBC/sbctide.F90
r10068 r12182 72 72 ! Temporarily set nsec_day to beginning of day. 73 73 nsec_day_orig = nsec_day 74 IF 74 IF( nsec_day /= NINT(0.5_wp * rdt) ) THEN 75 75 kt_tide = kt - (nsec_day - 0.5_wp * rdt)/rdt 76 76 nsec_day = NINT(0.5_wp * rdt) -
NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/SBC/tideini.F90
r11960 r12182 66 66 ! 67 67 IF( ln_tide ) THEN 68 IF 68 IF(lwp) THEN 69 69 WRITE(numout,*) 70 70 WRITE(numout,*) 'tide_init : Initialization of the tidal components' … … 125 125 kt_tide = nit000 126 126 ! 127 IF 127 IF(.NOT.ln_scal_load ) rn_scal_load = 0._wp 128 128 ! 129 129 END SUBROUTINE tide_init -
NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/ZDF/zdfiwm.F90
r11960 r12182 415 415 !! de Lavergne et al. in prep., 2017 416 416 !!---------------------------------------------------------------------- 417 INTEGER :: ji, jj, jk ! dummy loop indices418 417 INTEGER :: inum ! local integer 419 418 INTEGER :: ios -
NEMO/branches/2019/dev_r11943_MERGE_2019/src/SAS/diawri.F90
r11949 r12182 24 24 !!---------------------------------------------------------------------- 25 25 USE oce ! ocean dynamics and tracers 26 USE abl ! abl variables in case ln_abl = .true. 26 27 USE dom_oce ! ocean space and time domain 27 28 USE zdf_oce ! ocean vertical physics … … 51 52 PUBLIC dia_wri_state 52 53 PUBLIC dia_wri_alloc ! Called by nemogcm module 53 54 #if ! defined key_iomput 55 PUBLIC dia_wri_alloc_abl ! Called by sbcabl module (if ln_abl = .true.) 56 #endif 54 57 INTEGER :: nid_T, nz_T, nh_T, ndim_T, ndim_hT ! grid_T file 55 58 INTEGER :: nid_U, nz_U, nh_U, ndim_U, ndim_hU ! grid_U file 56 59 INTEGER :: nid_V, nz_V, nh_V, ndim_V, ndim_hV ! grid_V file 60 INTEGER :: ndim_A, ndim_hA ! ABL file 61 INTEGER :: nid_A, nz_A, nh_A ! grid_ABL file 57 62 INTEGER :: ndex(1) ! ??? 58 63 INTEGER, SAVE, ALLOCATABLE, DIMENSION(:) :: ndex_hT, ndex_hU, ndex_hV 64 INTEGER, SAVE, ALLOCATABLE, DIMENSION(:) :: ndex_hA, ndex_A ! ABL 59 65 60 66 !! * Substitutions … … 115 121 END FUNCTION dia_wri_alloc 116 122 123 INTEGER FUNCTION dia_wri_alloc_abl() 124 !!---------------------------------------------------------------------- 125 ALLOCATE( ndex_hA(jpi*jpj), ndex_A (jpi*jpj*jpkam1), STAT=dia_wri_alloc_abl) 126 CALL mpp_sum( 'diawri', dia_wri_alloc_abl ) 127 ! 128 END FUNCTION dia_wri_alloc_abl 117 129 118 130 SUBROUTINE dia_wri( kt ) … … 137 149 INTEGER :: ierr ! error code return from allocation 138 150 INTEGER :: iimi, iima, ipk, it, itmod, ijmi, ijma ! local integers 151 INTEGER :: ipka ! ABL 139 152 REAL(wp) :: zsto, zout, zmax, zjulian ! local scalars 153 REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: zw3d_abl ! ABL 3D workspace 140 154 !!---------------------------------------------------------------------- 141 155 ! … … 175 189 ijmi = 1 ; ijma = jpj 176 190 ipk = jpk 191 IF(ln_abl) ipka = jpkam1 177 192 178 193 ! define time axis … … 242 257 243 258 ! No W grid FILE 259 IF( ln_abl ) THEN 260 ! Define the ABL grid FILE ( nid_A ) 261 CALL dia_nam( clhstnam, nwrite, 'grid_ABL' ) 262 IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam ! filename 263 CALL histbeg( clhstnam, jpi, glamt, jpj, gphit, & ! Horizontal grid: glamt and gphit 264 & iimi, iima-iimi+1, ijmi, ijma-ijmi+1, & 265 & nit000-1, zjulian, rdt, nh_A, nid_A, domain_id=nidom, snc4chunks=snc4set ) 266 CALL histvert( nid_A, "ght_abl", "Vertical T levels", & ! Vertical grid: gdept 267 & "m", ipka, ght_abl(2:jpka), nz_A, "up" ) 268 ! ! Index of ocean points 269 ALLOCATE( zw3d_abl(jpi,jpj,ipka) ) 270 zw3d_abl(:,:,:) = 1._wp 271 CALL wheneq( jpi*jpj*ipka, zw3d_abl, 1, 1., ndex_A , ndim_A ) ! volume 272 CALL wheneq( jpi*jpj , zw3d_abl, 1, 1., ndex_hA, ndim_hA ) ! surface 273 DEALLOCATE(zw3d_abl) 274 ENDIF 244 275 245 276 ! Declare all the output fields as NETCDF variables … … 262 293 CALL histdef( nid_T, "sowindsp", "wind speed at 10m" , "m/s" , & ! wndm 263 294 & jpi, jpj, nh_T, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 295 ! 296 IF( ln_abl ) THEN 297 ! !!! nid_A : 3D 298 CALL histdef( nid_A, "t_abl", "Potential Temperature" , "K" , & ! t_abl 299 & jpi, jpj, nh_A, ipka, 1, ipka, nz_A, 32, clop, zsto, zout ) 300 CALL histdef( nid_A, "q_abl", "Humidity" , "kg/kg" , & ! q_abl 301 & jpi, jpj, nh_A, ipka, 1, ipka, nz_A, 32, clop, zsto, zout ) 302 CALL histdef( nid_A, "u_abl", "Atmospheric U-wind " , "m/s" , & ! u_abl 303 & jpi, jpj, nh_A, ipka, 1, ipka, nz_A, 32, clop, zsto, zout ) 304 CALL histdef( nid_A, "v_abl", "Atmospheric V-wind " , "m/s" , & ! v_abl 305 & jpi, jpj, nh_A, ipka, 1, ipka, nz_A, 32, clop, zsto, zout ) 306 CALL histdef( nid_A, "tke_abl", "Atmospheric TKE " , "m2/s2" , & ! tke_abl 307 & jpi, jpj, nh_A, ipka, 1, ipka, nz_A, 32, clop, zsto, zout ) 308 CALL histdef( nid_A, "avm_abl", "Atmospheric turbulent viscosity", "m2/s" , & ! avm_abl 309 & jpi, jpj, nh_A, ipka, 1, ipka, nz_A, 32, clop, zsto, zout ) 310 CALL histdef( nid_A, "avt_abl", "Atmospheric turbulent diffusivity", "m2/s2", & ! avt_abl 311 & jpi, jpj, nh_A, ipka, 1, ipka, nz_A, 32, clop, zsto, zout ) 312 CALL histdef( nid_A, "pblh", "Atmospheric boundary layer height " , "m", & ! pblh 313 & jpi, jpj, nh_A, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 314 #if defined key_si3 315 CALL histdef( nid_A, "oce_frac", "Fraction of open ocean" , " ", & ! ato_i 316 & jpi, jpj, nh_A, 1 , 1, 1 , -99 , 32, clop, zsto, zout ) 317 #endif 318 CALL histend( nid_A, snc4chunks=snc4set ) 319 ! 320 ENDIF 321 ! 264 322 265 323 CALL histend( nid_T, snc4chunks=snc4set ) … … 311 369 CALL histwrite( nid_T, "soicecov", it, fr_i , ndim_hT, ndex_hT ) ! ice fraction 312 370 CALL histwrite( nid_T, "sowindsp", it, wndm , ndim_hT, ndex_hT ) ! wind speed 371 ! 372 IF( ln_abl ) THEN 373 ALLOCATE( zw3d_abl(jpi,jpj,jpka) ) 374 IF( ln_mskland ) THEN 375 DO jk=1,jpka 376 zw3d_abl(:,:,jk) = tmask(:,:,1) 377 END DO 378 ELSE 379 zw3d_abl(:,:,:) = 1._wp 380 ENDIF 381 CALL histwrite( nid_A, "pblh" , it, pblh(:,:) *zw3d_abl(:,:,1 ), ndim_hA, ndex_hA ) ! pblh 382 CALL histwrite( nid_A, "u_abl" , it, u_abl (:,:,2:jpka,nt_n )*zw3d_abl(:,:,2:jpka), ndim_A , ndex_A ) ! u_abl 383 CALL histwrite( nid_A, "v_abl" , it, v_abl (:,:,2:jpka,nt_n )*zw3d_abl(:,:,2:jpka), ndim_A , ndex_A ) ! v_abl 384 CALL histwrite( nid_A, "t_abl" , it, tq_abl (:,:,2:jpka,nt_n,1)*zw3d_abl(:,:,2:jpka), ndim_A , ndex_A ) ! t_abl 385 CALL histwrite( nid_A, "q_abl" , it, tq_abl (:,:,2:jpka,nt_n,2)*zw3d_abl(:,:,2:jpka), ndim_A , ndex_A ) ! q_abl 386 CALL histwrite( nid_A, "tke_abl", it, tke_abl (:,:,2:jpka,nt_n )*zw3d_abl(:,:,2:jpka), ndim_A , ndex_A ) ! tke_abl 387 CALL histwrite( nid_A, "avm_abl", it, avm_abl (:,:,2:jpka )*zw3d_abl(:,:,2:jpka), ndim_A , ndex_A ) ! avm_abl 388 CALL histwrite( nid_A, "avt_abl", it, avt_abl (:,:,2:jpka )*zw3d_abl(:,:,2:jpka), ndim_A , ndex_A ) ! avt_abl 389 #if defined key_si3 390 CALL histwrite( nid_A, "oce_frac" , it, ato_i(:,:) , ndim_hA, ndex_hA ) ! ato_i 391 #endif 392 DEALLOCATE(zw3d_abl) 393 ENDIF 394 ! 313 395 314 396 ! Write fields on U grid … … 326 408 CALL histclo( nid_U ) 327 409 CALL histclo( nid_V ) 410 IF(ln_abl) CALL histclo( nid_A ) 328 411 ENDIF 329 412 ! -
NEMO/branches/2019/dev_r11943_MERGE_2019/tests/demo_cfgs.txt
r12150 r12182 10 10 WAD OCE 11 11 BENCH OCE ICE TOP 12 STATION_ASF OCE -
NEMO/branches/2019/dev_r11943_MERGE_2019/tests/test_cases.bib
r10627 r12182 115 115 abstract = {Many problems of fluid dynamics involve the coupled transport of several, density-like, dependent variables (for instance, densities of mass and momenta in elastic flows). In this paper, a conservative and synchronous flux-corrected transport (FCT) formalism is developed which aims at a consistent transport of such variables. The technique differs from traditional FCT algorithms in two respects. First, the limiting of transportive fluxes of the primary variables (e.g., mass and momentum) does not derive from smooth estimates of the variables, but it derives from analytic constraints implied by the Lagrangian form of the governing continuity equations, which are imposed on the specific mixing ratios of the variables (e.g., velocity components). Second, the traditional FCT limiting based on sufficiency conditions is augmented by an iterative procedure which approaches the necessity requirements. This procedure can also be used in the framework of traditional FCT schemes, and a demonstration is provided that it can significantly reduce some of the pathological behaviors of FCT algorithms. Although the approach derived is applicable to the transport of arbitrary conserved quantities, it is particularly useful for the synchronous transport of mass and momenta in elastic flows, where it assures intrinsic stability of the algorithm regardless of the magnitude of the mass-density variable. This latter property becomes especially important in fluids with large density variations, or in models with a material “vertical” coordinate (e.g., geophysical hydrostatic stratified flows in isopycnic/isentropic coordinates), where material surfaces can collapse to zero-mass layers admitting, therefore, arbitrarily large local Courant numbers.} 116 116 } 117 118 @article{Brodeau_al_2017, 119 author={Laurent Brodeau and Bernard Barnier and Sergey Gulev and Cian Woods}, 120 title={Climatologically significant effects of some approximations in the bulk parameterizations of turbulent air-sea fluxes}, 121 journal={J. Phys. Oceanogr.}, 122 doi={10.1175/JPO-D-16-0169.1}, 123 year={2017}, 124 pages = {5-28}, 125 volume={47}, 126 number={1} 127 }
Note: See TracChangeset
for help on using the changeset viewer.