My Project
Data Types | Functions/Subroutines | Variables
mod_force Module Reference

Functions/Subroutines

subroutine, public setup_forcing
 
subroutine, public update_rivers (NOW, FLUX, TEMP, SALT, WQM, SED, BIO)
 
subroutine, public update_groundwater (NOW, GW_FLUX, GW_TEMP, GW_SALT)
 
subroutine, public update_heat (NOW, HEAT_SWV, HEAT_NET)
 
subroutine, public update_wind (NOW, wstrx, wstry)
 
subroutine, public update_precipitation (NOW, Qprec, Qevap)
 
subroutine, public update_wave (NOW, WHS, WDIR, WPER, WLENGTH, WPER_BOT, WUB_BOT)
 
subroutine, public update_airpressure (NOW, PA_AIR)
 
subroutine, public update_tide (NOW, BND_ELV)
 
subroutine, public update_obc_salt (NOW, SALT)
 
subroutine, public update_obc_temp (NOW, TEMP)
 
subroutine, public update_ice (NOW, SAT, SWV, SPQ, CLD)
 
subroutine, public update_icing (NOW, SAT, WSPDX, WSPDY)
 

Variables

character(len=80), parameter, public wrf2fvcom_source = "wrf2fvcom version"
 
character(len=80), parameter, public fvcom_grid_source = "fvcom grid (unstructured) surface forcing"
 
character(len=80), parameter, public fvcom_cap_grid_source = "FVCOM grid (unstructured) surface forcing"
 
character(len=80), parameter, public wrf_grid_source = "wrf grid (structured) surface forcing"
 
character(len=80), parameter, public surf_forcing_pt_source = "single-point time-dependent surface forcing"
 
integer, public tide_forcing_type
 
integer, parameter, public tide_forcing_spectral = 1
 
integer, parameter, public tide_forcing_timeseries = 2
 
character(len=char_max_attlen), dimension(:), allocatable, public tide_forcing_comments
 
character(len=char_max_attlen), dimension(:), allocatable, public river_forcing_comments
 
character(len=char_max_attlen), dimension(:), allocatable, public gwater_forcing_comments
 
character(len=char_max_attlen), public obc_s_comments
 
character(len=char_max_attlen), public obc_t_comments
 
character(len=char_max_attlen), dimension(:), allocatable, public heat_forcing_comments
 
character(len=char_max_attlen), dimension(:), allocatable, public heat_calculate_comments
 
character(len=char_max_attlen), dimension(:), allocatable, public heat_solar_comments
 
character(len=char_max_attlen), dimension(:), allocatable, public winds_forcing_comments
 
character(len=char_max_attlen), dimension(:), allocatable, public waves_forcing_comments
 
character(len=char_max_attlen), dimension(:), allocatable, public precip_forcing_comments
 
character(len=char_max_attlen), dimension(:), allocatable, public airpressure_forcing_comments
 
character(len=char_max_attlen), dimension(:), allocatable, public ice_forcing_comments
 
character(len=char_max_attlen), dimension(:), allocatable, public icing_forcing_comments
 

Function/Subroutine Documentation

◆ setup_forcing()

subroutine, public mod_force::setup_forcing ( )

Definition at line 301 of file mod_force.f90.

301  IMPLICIT NONE
302  IF(dbg_set(dbg_sbr)) write(ipt,*) "START SETUP_FORCING"
303 
304  IF(dbg_set(dbg_log)) THEN
305  WRITE(ipt,* )'!'
306  WRITE(ipt,* )'! SETTING UP PRESCRIBED BOUNDARY CONDITIONS '
307  WRITE(ipt,* )'!'
308  END IF
309 
310 
311  ! NULLIFY EVERYTHING
312  NULLIFY(tide_file, tide_elv_n, tide_elv_p)
313 
314  NULLIFY(gwater_file)
315 
316  NULLIFY(heat_file,heat_intp_n, heat_intp_c, heat_swv_p,&
317  & heat_swv_n)
318 
319  NULLIFY(winds_file,winds_intp_n,winds_intp_c, winds_strx_n,&
320  & winds_strx_p, winds_stry_n, winds_stry_p)
321 
322  NULLIFY(airpressure_p_file,airpressure_intp_n,airpressure_intp_c, air_pressure_n,&
323  & air_pressure_p)
324 
325  NULLIFY(waves_file,waves_intp_n,waves_intp_c, &
326  & waves_height_n, waves_height_p, &
327  & waves_length_n, waves_length_p, &
328  & waves_direction_n, waves_direction_p, &
329  & waves_period_n, waves_period_p, &
330  & waves_per_bot_n, waves_per_bot_p, &
331  & waves_ub_bot_n, waves_ub_bot_p )
332 
333 
334 
335 
336 
337  CALL tidal_elevation
338  CALL obc_temperature
339  CALL obc_salinity
340  CALL river_discharge
341  CALL surface_heating
342  CALL surface_windstress
343  CALL surface_precipitation
344  CALL surface_airpressure
345 
346 
347 
348 
349  CALL ground_water
350 
351  ! ORDER IS IMPORTANT! ICE AND ICING MAY USE THE SAME POINTERS TO
352  ! REFERENCE FILE! THEY MUST BE SET UP LAST.
353  CALL icing_forcing
354 
355  CALL ice_model_forcing
356 
357  IF(dbg_set(dbg_sbr)) write(ipt,*) "END SETUP_FORCING"
integer ipt
Definition: mod_main.f90:922
Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_airpressure()

subroutine, public mod_force::update_airpressure ( type(time), intent(in)  NOW,
real(sp), dimension(:), allocatable  PA_AIR 
)

Definition at line 6889 of file mod_force.f90.

6889  IMPLICIT NONE
6890  TYPE(TIME), INTENT(IN) :: NOW
6891  TYPE(TIME) :: ATIME
6892  REAL(SP), ALLOCATABLE :: PA_AIR(:)
6893  REAL(SP), POINTER :: VNP(:), VPP(:)
6894  TYPE(NCFTIME), POINTER :: FTM
6895  INTEGER :: STATUS
6896 
6897  IF(.NOT. ALLOCATED(pa_air)) CALL fatal_error &
6898  &("THE AIR PRESSURE VARIABLE PASSED TO UPDATE IS NOT ALLOCATED")
6899 
6900 !===================================================
6901  SELECT CASE(airpressure_kind)
6902 !===================================================
6903  CASE (cnstnt)
6904 
6905  pa_air(1:mt) = airpressure_value
6906 
6907  RETURN
6908 
6909  CASE(sttc)
6910 
6911  CALL fatal_error("STATIC AIR PRESSURE Not Set Up Yet")
6912 
6913  CASE(tmdpndnt)
6914 
6915  CALL fatal_error("TIME DEPENDANT AIR PRESSURE Not Set Up Yet")
6916 
6917  CASE(prdc)
6918 
6919  ! TO SET ZERO TIME PHASE USING RUNFILE START TIME
6920 ! ATIME= NOW - RUNFILE_StartTime
6921 
6922  ! TO USE ZERO AS THE PHASE OF THE FORCING
6923  atime= now
6924 
6925 
6926  atime = mod(atime,airpressure_period)
6927 
6928  CASE(vrbl)
6929 
6930  atime = now
6931  END SELECT
6932 !===================================================
6933 !===================================================
6934 
6935 
6936 
6937 
6938 !===================================================
6939  SELECT CASE(airpressure_forcing_type)
6940 !===================================================
6941  CASE(airpressure_is_wrfgrid)
6942 
6943  ftm => airpressure_p_file%FTIME
6944 
6945  ! AIR PRESSURE
6946  CALL update_var_bracket(airpressure_p_file,air_pressure_p,air_pressure_n,atime,status,airpressure_intp_n)
6947  IF (status /= 0) THEN
6948  CALL fatal_error("COULD NOT UPATE AIR PRESSURE BRACKET: BOUNDS EXCEEDED?")
6949  end if
6950 
6951  CALL nc_point_var(air_pressure_n,vnp)
6952  CALL nc_point_var(air_pressure_p,vpp)
6953  pa_air = ftm%NEXT_WGHT * vnp + ftm%PREV_WGHT * vpp
6954 
6955 !===================================================
6956  CASE(airpressure_is_fvcomgrid)
6957 !===================================================
6958 
6959  ftm => airpressure_p_file%FTIME
6960 
6961  ! AIR PRESSURE
6962  CALL update_var_bracket(airpressure_p_file,air_pressure_p,air_pressure_n,atime,status)
6963  IF (status /= 0) THEN
6964  CALL fatal_error("COULD NOT UPATE AIR PRESSURE BRACKET: BOUNDS EXCEEDED?")
6965  end if
6966 
6967  CALL nc_point_var(air_pressure_n,vnp)
6968  CALL nc_point_var(air_pressure_p,vpp)
6969  pa_air = ftm%NEXT_WGHT * vnp + ftm%PREV_WGHT * vpp
6970 
6971  CASE DEFAULT
6972  CALL fatal_error("UNKNOWN AIRPRESSURE_FORCING_TYPE IN UPDATE AIR PRESSURE")
6973  END SELECT
6974 
6975 
character(len=80) airpressure_kind
Definition: mod_main.f90:474
character(len=80), parameter sttc
Definition: mod_main.f90:489
integer mt
Definition: mod_main.f90:78
real(sp) airpressure_value
Definition: mod_main.f90:475
character(len=80), parameter cnstnt
Definition: mod_main.f90:488
character(len=80), parameter vrbl
Definition: mod_main.f90:492
character(len=80), parameter tmdpndnt
Definition: mod_main.f90:490
character(len=80), parameter prdc
Definition: mod_main.f90:491
Here is the call graph for this function:

◆ update_groundwater()

subroutine, public mod_force::update_groundwater ( type(time), intent(in)  NOW,
real(sp), dimension(:), allocatable  GW_FLUX,
real(sp), dimension(:), optional, allocatable  GW_TEMP,
real(sp), dimension(:), optional, allocatable  GW_SALT 
)

Definition at line 6200 of file mod_force.f90.

6200  IMPLICIT NONE
6201  TYPE(TIME), INTENT(IN) :: NOW
6202  TYPE(TIME) :: GWTIME
6203  REAL(SP), ALLOCATABLE :: GW_FLUX(:)
6204  REAL(SP), ALLOCATABLE, OPTIONAL :: GW_SALT(:)
6205  REAL(SP), ALLOCATABLE, OPTIONAL :: GW_TEMP(:)
6206  TYPE(NCFTIME), POINTER :: FTM
6207  INTEGER :: STATUS
6208  REAL(SP), POINTER :: VNP(:), VPP(:)
6209 
6210  IF(.NOT. ALLOCATED(gw_flux)) CALL fatal_error &
6211  &("THE GROUNDWATER FLUX VARIABLE PASSED TO UPDATE IS NOT ALLOCATED")
6212 
6213 
6214 !===================================================
6215  SELECT CASE(groundwater_kind)
6216 !===================================================
6217  CASE (cnstnt)
6218 
6219  ! CONSTANT GROUND WATER FORCING IS ALWAYS A FLOW RATE (M/S)...
6220  ! CONVERT TO A FLUX
6221  gw_flux(1:mt) = groundwater_flow*art1(1:mt)
6222 
6223  IF(groundwater_temp_on .and. PRESENT(gw_temp)) THEN
6224  IF(.NOT. ALLOCATED(gw_temp)) CALL fatal_error &
6225  &("THE GROUNDWATER TEMPERATURE VARIABLE PASSED TO UPDATE IS NOT ALLOCATED")
6226  gw_temp(1:mt) = groundwater_temp
6227  END IF
6228 
6229  IF(groundwater_salt_on .and. PRESENT(gw_salt)) THEN
6230  IF(.NOT. ALLOCATED(gw_salt)) CALL fatal_error &
6231  &("THE GROUNDWATER SALINITY VARIABLE PASSED TO UPDATE IS NOT ALLOCATED")
6232  gw_salt(1:mt) = groundwater_salt
6233  END IF
6234 
6235  RETURN
6236 
6237  CASE(sttc)
6238 
6239  CALL fatal_error("STATIC HEATING Not Set Up Yet")
6240 
6241  CASE(tmdpndnt)
6242 
6243  CALL fatal_error("TIME DEPENDANT HEATING Not Set Up Yet")
6244 
6245  CASE(prdc)
6246 
6247  ! TO SET ZERO TIME PHASE USING RUNFILE START TIME
6248 ! GWTIME= NOW - RUNFILE_StartTime
6249 
6250  ! TO USE ZERO AS THE PHASE OF THE FORCING
6251  gwtime= now
6252 
6253 
6254  gwtime = mod(gwtime,gwater_period)
6255 
6256  CASE(vrbl)
6257 
6258 
6259  gwtime = now
6260  END SELECT
6261 !===================================================
6262 !===================================================
6263 
6264 !===================================================
6265  SELECT CASE(gwater_forcing_type)
6266 !===================================================
6267  CASE(gwater_is_fvcomgrid)
6268 
6269  ftm => gwater_file%FTIME
6270 
6271  ! GROUND WATER FLUX
6272  CALL update_var_bracket(gwater_file,gwater_flux_p,gwater_flux_n,gwtime,status)
6273  IF (status /= 0) THEN
6274  CALL fatal_error("COULD NOT UPATE GROUNDWATER_FILE TIME BRACKET: BOUNDS EXCEEDED?")
6275  end if
6276 
6277  CALL nc_point_var(gwater_flux_n,vnp)
6278  CALL nc_point_var(gwater_flux_p,vpp)
6279 
6280  gw_flux = ftm%NEXT_WGHT * vnp + ftm%PREV_WGHT * vpp
6281 
6282  ! IF THE GROUND WATER IS A FLOW RATE CONVERT TO A FLUX
6283  IF(gwater_units == gwater_ms_1 ) gw_flux = gw_flux *art1
6284 
6285 
6286  ! GROUND WATER TEMP
6287  IF(groundwater_temp_on .and. PRESENT(gw_temp)) THEN
6288 
6289  IF(.NOT. ALLOCATED(gw_temp)) CALL fatal_error &
6290  &("THE GROUNDWATER TEMPERATURE VARIABLE PASSED TO UPDATE IS NOT ALLOCATED")
6291 
6292  CALL update_var_bracket(gwater_file,gwater_temp_p,gwater_temp_n,gwtime,status)
6293  IF (status /= 0) THEN
6294  CALL fatal_error("COULD NOT UPATE GROUNDWATER_FILE TIME BRACKET: BOUNDS EXCEEDED?")
6295  end if
6296 
6297  CALL nc_point_var(gwater_temp_n,vnp)
6298  CALL nc_point_var(gwater_temp_p,vpp)
6299 
6300  gw_temp = ftm%NEXT_WGHT * vnp + ftm%PREV_WGHT * vpp
6301  END IF
6302 
6303  ! GROUND WATER SALT
6304  IF(groundwater_salt_on .and. PRESENT(gw_salt)) THEN
6305 
6306  IF(.NOT. ALLOCATED(gw_salt)) CALL fatal_error &
6307  &("THE GROUNDWATER SALINITY VARIABLE PASSED TO UPDATE IS NOT ALLOCATED")
6308 
6309  CALL update_var_bracket(gwater_file,gwater_salt_p,gwater_salt_n,gwtime,status)
6310  IF (status /= 0) THEN
6311  CALL fatal_error("COULD NOT UPATE GROUNDWATER_FILE TIME BRACKET: BOUNDS EXCEEDED?")
6312  end if
6313 
6314  CALL nc_point_var(gwater_salt_n,vnp)
6315  CALL nc_point_var(gwater_salt_p,vpp)
6316 
6317  gw_salt = ftm%NEXT_WGHT * vnp + ftm%PREV_WGHT * vpp
6318  END IF
6319 
6320 
6321 
6322  CASE DEFAULT
6323  CALL fatal_error("UNKNOWN GROUNDWATER_FORCING_TYPE IN UPDATE GROUNDWATER")
6324  END SELECT
6325 
6326 
character(len=80), parameter sttc
Definition: mod_main.f90:489
integer mt
Definition: mod_main.f90:78
real(sp), dimension(:), allocatable, target art1
Definition: mod_main.f90:1010
real(sp) groundwater_salt
Definition: mod_main.f90:655
logical groundwater_salt_on
Definition: mod_main.f90:656
real(sp) groundwater_flow
Definition: mod_main.f90:652
character(len=80) groundwater_kind
Definition: mod_main.f90:650
real(sp) groundwater_temp
Definition: mod_main.f90:653
character(len=80), parameter cnstnt
Definition: mod_main.f90:488
character(len=80), parameter vrbl
Definition: mod_main.f90:492
character(len=80), parameter tmdpndnt
Definition: mod_main.f90:490
character(len=80), parameter prdc
Definition: mod_main.f90:491
logical groundwater_temp_on
Definition: mod_main.f90:654
Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_heat()

subroutine, public mod_force::update_heat ( type(time), intent(in)  NOW,
real(sp), dimension(:), allocatable  HEAT_SWV,
real(sp), dimension(:), allocatable  HEAT_NET 
)

Definition at line 6330 of file mod_force.f90.

6330  IMPLICIT NONE
6331  TYPE(TIME), INTENT(IN) :: NOW
6332  TYPE(TIME) :: HTIME
6333  REAL(SP), ALLOCATABLE :: HEAT_SWV(:), HEAT_NET(:)
6334  TYPE(NCFTIME), POINTER :: FTM
6335  INTEGER :: STATUS
6336  REAL(SP), POINTER :: VNP(:), VPP(:)
6337 
6338  IF(.NOT. ALLOCATED(heat_swv)) CALL fatal_error &
6339  &("THE HEAT SHORTWAVE VARIABLE PASSED TO UPDATE IS NOT ALLOCATED")
6340 
6341  IF(.NOT. ALLOCATED(heat_net)) CALL fatal_error &
6342  &("THE NET HEAT VARIABLE PASSED TO UPDATE IS NOT ALLOCATED")
6343 
6344 !===================================================
6345  SELECT CASE(heating_kind)
6346 !===================================================
6347  CASE (cnstnt)
6348 
6349  heat_swv(1:mt) = heating_radiation
6350  heat_net(1:mt) = heating_netflux
6351 
6352  RETURN
6353 
6354  CASE(sttc)
6355 
6356  CALL fatal_error("STATIC HEATING Not Set Up Yet")
6357 
6358  CASE(tmdpndnt)
6359 
6360  CALL fatal_error("TIME DEPENDANT HEATING Not Set Up Yet")
6361 
6362  CASE(prdc)
6363 
6364  ! TO SET ZERO TIME PHASE USING RUNFILE START TIME
6365 ! HTIME= NOW - RUNFILE_StartTime
6366 
6367  ! TO USE ZERO AS THE PHASE OF THE FORCING
6368  htime= now
6369 
6370 
6371  htime = mod(htime,heat_period)
6372 
6373  CASE(vrbl)
6374 
6375 
6376  htime = now
6377  END SELECT
6378 !===================================================
6379 !===================================================
6380 
6381 
6382 !===================================================
6383  SELECT CASE(heat_forcing_type)
6384 !===================================================
6385  CASE(heat_is_wrfgrid)
6386 
6387  ftm => heat_file%FTIME
6388 
6389  ! SHORT WAVE RADIATION
6390  CALL update_var_bracket(heat_file,heat_swv_p,heat_swv_n,htime,status,heat_intp_n)
6391  IF (status /= 0) THEN
6392  CALL fatal_error("COULD NOT UPATE HEAT_FILE TIME BRACKET: BOUNDS EXCEEDED?")
6393  end if
6394 
6395  CALL nc_point_var(heat_swv_n,vnp)
6396  CALL nc_point_var(heat_swv_p,vpp)
6397 
6398  heat_swv = ftm%NEXT_WGHT * vnp + ftm%PREV_WGHT * vpp
6399 
6400  ! NET HEAT FLUX
6401  CALL update_var_bracket(heat_file,heat_net_p,heat_net_n,htime,status,heat_intp_n)
6402  IF (status /= 0) THEN
6403  CALL fatal_error("COULD NOT UPATE HEAT_FILE TIME BRACKET: BOUNDS EXCEEDED?")
6404  end if
6405 
6406  CALL nc_point_var(heat_net_n,vnp)
6407  CALL nc_point_var(heat_net_p,vpp)
6408  heat_net = ftm%NEXT_WGHT * vnp + ftm%PREV_WGHT * vpp
6409 
6410  CASE(heat_is_fvcomgrid)
6411 
6412  ftm => heat_file%FTIME
6413 
6414  ! SHORT WAVE RADIATION
6415  CALL update_var_bracket(heat_file,heat_swv_p,heat_swv_n,htime,status)
6416  IF (status /= 0) THEN
6417  CALL fatal_error("COULD NOT UPATE HEAT_FILE TIME BRACKET: BOUNDS EXCEEDED?")
6418  end if
6419 
6420  CALL nc_point_var(heat_swv_n,vnp)
6421  CALL nc_point_var(heat_swv_p,vpp)
6422 
6423  heat_swv = ftm%NEXT_WGHT * vnp + ftm%PREV_WGHT * vpp
6424 
6425  ! NET HEAT FLUX
6426  CALL update_var_bracket(heat_file,heat_net_p,heat_net_n,htime,status)
6427  IF (status /= 0) THEN
6428  CALL fatal_error("COULD NOT UPATE HEAT_FILE TIME BRACKET: BOUNDS EXCEEDED?")
6429  end if
6430 
6431  CALL nc_point_var(heat_net_n,vnp)
6432  CALL nc_point_var(heat_net_p,vpp)
6433  heat_net = ftm%NEXT_WGHT * vnp + ftm%PREV_WGHT * vpp
6434 
6435 
6436  CASE DEFAULT
6437  CALL fatal_error("UNKNOWN HEAT_FORCING_TYPE IN UPDATE HEAT")
6438  END SELECT
6439 
6440 
character(len=80), parameter sttc
Definition: mod_main.f90:489
integer mt
Definition: mod_main.f90:78
real(sp) heating_radiation
Definition: mod_main.f90:457
real(sp) heating_netflux
Definition: mod_main.f90:458
character(len=80) heating_kind
Definition: mod_main.f90:453
character(len=80), parameter cnstnt
Definition: mod_main.f90:488
character(len=80), parameter vrbl
Definition: mod_main.f90:492
character(len=80), parameter tmdpndnt
Definition: mod_main.f90:490
character(len=80), parameter prdc
Definition: mod_main.f90:491
Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_ice()

subroutine, public mod_force::update_ice ( type(time), intent(in)  NOW,
real(sp), dimension(:), allocatable  SAT,
real(sp), dimension(:), allocatable  SWV,
real(sp), dimension(:), allocatable  SPQ,
real(sp), dimension(:), allocatable  CLD 
)

Definition at line 7082 of file mod_force.f90.

7082  IMPLICIT NONE
7083  TYPE(TIME), INTENT(IN) :: NOW
7084  TYPE(TIME) :: WTIME
7085  REAL(SP), ALLOCATABLE :: SAT(:)
7086  REAL(SP), ALLOCATABLE :: SWV(:)
7087  REAL(SP), ALLOCATABLE :: SLP(:)
7088  REAL(SP), ALLOCATABLE :: SPQ(:)
7089  REAL(SP), ALLOCATABLE :: CLD(:)
7090  REAL(SP), POINTER :: VNP(:), VPP(:)
7091  TYPE(NCFTIME), POINTER :: FTM
7092  INTEGER :: STATUS
7093 
7094  IF(.NOT. ALLOCATED(sat)) CALL fatal_error &
7095  &("THE Sea Surface Air Temperature VARIABLE PASSED TO UPDATE ICE IS NOT ALLOCATED")
7096  IF(.NOT. ALLOCATED(swv)) CALL fatal_error &
7097  &("THE SHORTWAVE RADIATION VARIABLE PASSED TO UPDATE ICE IS NOT ALLOCATED")
7098  IF(.NOT. ALLOCATED(spq)) CALL fatal_error &
7099  &("THE SPECIFIC HUMIDIY VARIABLE PASSED TO UPDATE ICE IS NOT ALLOCATED")
7100  IF(.NOT. ALLOCATED(cld)) CALL fatal_error &
7101  &("THE CLOUD COVER VARIABLE PASSED TO UPDATE ICE IS NOT ALLOCATED")
7102 
7103 !===================================================
7104  SELECT CASE(ice_forcing_kind)
7105 !===================================================
7106  CASE (cnstnt)
7107 
7108  sat(1:mt) = ice_air_temp
7109  spq(1:mt) = ice_spec_humidity
7110  cld(1:mt) = ice_cloud_cover
7111  swv(1:mt) = ice_shortwave
7112 
7113  RETURN
7114 
7115  CASE(sttc)
7116 
7117  CALL fatal_error("STATIC ICE FORCING Not Set Up Yet")
7118 
7119  CASE(tmdpndnt)
7120 
7121  CALL fatal_error("TIME DEPENDANT ICE FORCING Not Set Up Yet")
7122 
7123  CASE(prdc)
7124 
7125  ! TO SET ZERO TIME PHASE USING RUNFILE START TIME
7126 ! WTIME= NOW - RUNFILE_StartTime
7127 
7128  ! TO USE ZERO AS THE PHASE OF THE FORCING
7129  wtime= now
7130 
7131 
7132  wtime = mod(wtime,ice_period)
7133 
7134  CASE(vrbl)
7135 
7136  wtime = now
7137  END SELECT
7138 
7139 !===================================================
7140  SELECT CASE(ice_forcing_type)
7141 !===================================================
7142  CASE(ice_is_wrfgrid)
7143 !===================================================
7144 
7145  ftm => ice_file%FTIME
7146 
7147  ! THE SEA SURFACE AIR TEMP
7148  CALL update_var_bracket(ice_file,ice_sat_p,ice_sat_n,wtime,status,ice_intp_n)
7149  IF (status /= 0) THEN
7150  CALL fatal_error("COULD NOT UPATE ICE Surface Air Temp BRACKET: BOUNDS EXCEEDED?")
7151  end if
7152 
7153  CALL nc_point_var(ice_sat_n,vnp)
7154  CALL nc_point_var(ice_sat_p,vpp)
7155  sat = ftm%NEXT_WGHT * vnp + ftm%PREV_WGHT * vpp
7156 
7157  ! SHORT WAVE
7158 ! CALL UPDATE_VAR_BRACKET(ICE_FILE,ICE_SWV_P,ICE_SWV_N,WTIME,STATUS,ICE_INTP_N)
7159  CALL update_var_bracket(heat_file,ice_swv_p,ice_swv_n,wtime,status,ice_intp_n)
7160  IF (status /= 0) THEN
7161  CALL fatal_error("COULD NOT UPDATE ICE SHORTWAVE BRACKET: BOUNDS EXCEEDED?")
7162  end if
7163 
7164  CALL nc_point_var(ice_swv_n,vnp)
7165  CALL nc_point_var(ice_swv_p,vpp)
7166  swv = ftm%NEXT_WGHT * vnp + ftm%PREV_WGHT * vpp
7167 
7168  ! THE SPECIFIC HUMIDITY
7169  CALL update_var_bracket(ice_file,ice_spq_p,ice_spq_n,wtime,status,ice_intp_n)
7170  IF (status /= 0) THEN
7171  CALL fatal_error("COULD NOT UPATE ICE SPECIFIC HUMIDITY BRACKET: BOUNDS EXCEEDED?")
7172  end if
7173 
7174  CALL nc_point_var(ice_spq_n,vnp)
7175  CALL nc_point_var(ice_spq_p,vpp)
7176  spq = ftm%NEXT_WGHT * vnp + ftm%PREV_WGHT * vpp
7177 
7178 
7179  ! THE CLOUD COVER
7180  CALL update_var_bracket(ice_file,ice_cld_p,ice_cld_n,wtime,status,ice_intp_n)
7181  IF (status /= 0) THEN
7182  CALL fatal_error("COULD NOT UPATE ICE CLOUD COVER BRACKET: BOUNDS EXCEEDED?")
7183  end if
7184 
7185  CALL nc_point_var(ice_cld_n,vnp)
7186  CALL nc_point_var(ice_cld_p,vpp)
7187  cld = ftm%NEXT_WGHT * vnp + ftm%PREV_WGHT * vpp
7188 
7189 
7190 
7191 !===================================================
7192 !JQI CASE(ICING_IS_FVCOMGRID)
7193  CASE(ice_is_fvcomgrid)
7194 !===================================================
7195 !JQI FTM => ICING_FILE%FTIME
7196  ftm => ice_file%FTIME
7197 
7198 
7199  ! THE SEA SURFACE AIR TEMP
7200  CALL update_var_bracket(ice_file,ice_sat_p,ice_sat_n,wtime,status)
7201  IF (status /= 0) THEN
7202  CALL fatal_error("COULD NOT UPATE ICE Surface Air Temp BRACKET: BOUNDS EXCEEDED?")
7203  end if
7204 
7205  CALL nc_point_var(ice_sat_n,vnp)
7206  CALL nc_point_var(ice_sat_p,vpp)
7207  sat = ftm%NEXT_WGHT * vnp + ftm%PREV_WGHT * vpp
7208 
7209  ! SHORT WAVE
7210 ! CALL UPDATE_VAR_BRACKET(ICE_FILE,ICE_SWV_P,ICE_SWV_N,WTIME,STATUS)
7211  CALL update_var_bracket(heat_file,ice_swv_p,ice_swv_n,wtime,status)
7212  IF (status /= 0) THEN
7213  CALL fatal_error("COULD NOT UPDATE ICE SHORTWAVE BRACKET: BOUNDS EXCEEDED?")
7214  end if
7215 
7216  CALL nc_point_var(ice_swv_n,vnp)
7217  CALL nc_point_var(ice_swv_p,vpp)
7218  swv = ftm%NEXT_WGHT * vnp + ftm%PREV_WGHT * vpp
7219 
7220 
7221  ! THE SPECIFIC HUMIDITY
7222  CALL update_var_bracket(ice_file,ice_spq_p,ice_spq_n,wtime,status)
7223  IF (status /= 0) THEN
7224  CALL fatal_error("COULD NOT UPATE ICE SPECIFIC HUMIDITY BRACKET: BOUNDS EXCEEDED?")
7225  end if
7226 
7227  CALL nc_point_var(ice_spq_n,vnp)
7228  CALL nc_point_var(ice_spq_p,vpp)
7229  spq = ftm%NEXT_WGHT * vnp + ftm%PREV_WGHT * vpp
7230 
7231 
7232  ! THE CLOUD COVER
7233  CALL update_var_bracket(ice_file,ice_cld_p,ice_cld_n,wtime,status)
7234  IF (status /= 0) THEN
7235  CALL fatal_error("COULD NOT UPATE ICE CLOUD COVER BRACKET: BOUNDS EXCEEDED?")
7236  end if
7237 
7238  CALL nc_point_var(ice_cld_n,vnp)
7239  CALL nc_point_var(ice_cld_p,vpp)
7240  cld = ftm%NEXT_WGHT * vnp + ftm%PREV_WGHT * vpp
7241 
7242 !===================================================
7243  CASE DEFAULT
7244  CALL fatal_error("UNKNOWN ICING_FORCING_TYPE IN UPDATE ICING")
7245  END SELECT
7246 !===================================================
character(len=80), parameter sttc
Definition: mod_main.f90:489
real(sp) ice_spec_humidity
Definition: mod_main.f90:730
integer mt
Definition: mod_main.f90:78
real(sp) ice_shortwave
Definition: mod_main.f90:732
real(sp) ice_air_temp
Definition: mod_main.f90:729
real(sp) ice_cloud_cover
Definition: mod_main.f90:731
character(len=80) ice_forcing_kind
Definition: mod_main.f90:727
character(len=80), parameter cnstnt
Definition: mod_main.f90:488
character(len=80), parameter vrbl
Definition: mod_main.f90:492
character(len=80), parameter tmdpndnt
Definition: mod_main.f90:490
character(len=80), parameter prdc
Definition: mod_main.f90:491
Here is the call graph for this function:

◆ update_icing()

subroutine, public mod_force::update_icing ( type(time), intent(in)  NOW,
real(sp), dimension(:), allocatable  SAT,
real(sp), dimension(:), allocatable  WSPDX,
real(sp), dimension(:), allocatable  WSPDY 
)

Definition at line 7252 of file mod_force.f90.

7252  IMPLICIT NONE
7253  TYPE(TIME), INTENT(IN) :: NOW
7254  TYPE(TIME) :: WTIME
7255  REAL(SP), ALLOCATABLE :: SAT(:)
7256  REAL(SP), ALLOCATABLE :: WSPDX(:)
7257  REAL(SP), ALLOCATABLE :: WSPDY(:)
7258  REAL(SP), POINTER :: VNP(:), VPP(:)
7259  TYPE(NCFTIME), POINTER :: FTM
7260  INTEGER :: STATUS
7261  REAL(SP), PARAMETER :: K2C = 273.15_sp
7262 
7263  IF(.NOT. ALLOCATED(sat)) CALL fatal_error &
7264  &("THE Sea Surface Air Temperature VARIABLE PASSED TO UPDATE IS NOT ALLOCATED")
7265  IF(.NOT. ALLOCATED(wspdx) .or. .NOT.ALLOCATED(wspdy)) CALL fatal_error &
7266  &("THE WIND SPEED VARIABLES PASSED TO UPDATE ARE NOT ALLOCATED")
7267 
7268 !===================================================
7269  SELECT CASE(icing_forcing_kind)
7270 !===================================================
7271  CASE (cnstnt)
7272 
7273  wspdx(1:mt) = icing_wspd
7274  wspdy=0.0_sp
7275  ! WEATHER DATA NEEDS TO HAVE WIND VELOCITY, MUST USE RECORD
7276  ! VECTOR BUT THE MODEL ONLY NEEDS A MAGNITUDE.
7277 
7278  sat(1:mt) = icing_air_temp
7279 
7280  RETURN
7281 
7282  CASE(sttc)
7283 
7284  CALL fatal_error("STATIC ICING Not Set Up Yet")
7285 
7286  CASE(tmdpndnt)
7287 
7288  CALL fatal_error("TIME DEPENDANT ICING Not Set Up Yet")
7289 
7290  CASE(prdc)
7291 
7292  ! TO SET ZERO TIME PHASE USING RUNFILE START TIME
7293 ! WTIME= NOW - RUNFILE_StartTime
7294 
7295  ! TO USE ZERO AS THE PHASE OF THE FORCING
7296  wtime= now
7297 
7298 
7299  wtime = mod(wtime,icing_period)
7300 
7301  CASE(vrbl)
7302 
7303  wtime = now
7304  END SELECT
7305 
7306 
7307 !===================================================
7308  SELECT CASE(icing_forcing_type)
7309 !===================================================
7310  CASE(icing_is_wrfgrid)
7311 !===================================================
7312 
7313  ftm => icing_file%FTIME
7314 
7315  ! THE X DIRECTION WIND SPEED
7316  CALL update_var_bracket(icing_file,icing_wspx_p,icing_wspx_n,wtime,status,icing_intp_n)
7317  IF (status /= 0) THEN
7318  CALL fatal_error("COULD NOT UPATE WIND SPEED X BRACKET: BOUNDS EXCEEDED?")
7319  end if
7320 
7321  CALL nc_point_var(icing_wspx_n,vnp)
7322  CALL nc_point_var(icing_wspx_p,vpp)
7323 ! ALLOCATE(WSPDX(0:MT))
7324  wspdx = ftm%NEXT_WGHT * vnp + ftm%PREV_WGHT * vpp
7325 
7326  ! THE Y DIRECTION WIND SPEED
7327  CALL update_var_bracket(icing_file,icing_wspy_p,icing_wspy_n,wtime,status,icing_intp_n)
7328  IF (status /= 0) THEN
7329  CALL fatal_error("COULD NOT UPATE WIND SPEED Y BRACKET: BOUNDS EXCEEDED?")
7330  end if
7331 
7332  CALL nc_point_var(icing_wspy_n,vnp)
7333  CALL nc_point_var(icing_wspy_p,vpp)
7334 ! ALLOCATE(WSPDY(0:MT))
7335  wspdy = ftm%NEXT_WGHT * vnp + ftm%PREV_WGHT * vpp
7336 
7337 ! WSPD = sqrt(wspdy**2 + wspdx**2)
7338 ! wspd(0) = 0.0_sp
7339 ! deallocate(wspdy,wspdx)
7340 
7341  ! THE SEA SURFACE AIR TEMP
7342  CALL update_var_bracket(icing_file,icing_sat_p,icing_sat_n,wtime,status,icing_intp_n)
7343  IF (status /= 0) THEN
7344  CALL fatal_error("COULD NOT UPATE Surface Air Temp BRACKET: BOUNDS EXCEEDED?")
7345  end if
7346 
7347  CALL nc_point_var(icing_sat_n,vnp)
7348  CALL nc_point_var(icing_sat_p,vpp)
7349  sat = ftm%NEXT_WGHT * vnp + ftm%PREV_WGHT * vpp - k2c
7350 
7351 !===================================================
7352  CASE(icing_is_fvcomgrid)
7353 !===================================================
7354  ftm => icing_file%FTIME
7355 
7356  ! THE X DIRECTION WIND SPEED
7357  CALL update_var_bracket(icing_file,icing_wspx_p,icing_wspx_n,wtime,status)
7358  IF (status /= 0) THEN
7359  CALL fatal_error("COULD NOT UPATE WIND SPEED X BRACKET: BOUNDS EXCEEDED?")
7360  end if
7361 
7362  CALL nc_point_var(icing_wspx_n,vnp)
7363  CALL nc_point_var(icing_wspx_p,vpp)
7364 ! ALLOCATE(WSPDX(0:MT))
7365  wspdx = ftm%NEXT_WGHT * vnp + ftm%PREV_WGHT * vpp
7366 
7367  ! THE Y DIRECTION WIND SPEED
7368  CALL update_var_bracket(icing_file,icing_wspy_p,icing_wspy_n,wtime,status)
7369  IF (status /= 0) THEN
7370  CALL fatal_error("COULD NOT UPATE WIND SPEED Y BRACKET: BOUNDS EXCEEDED?")
7371  end if
7372 
7373  CALL nc_point_var(icing_wspy_n,vnp)
7374  CALL nc_point_var(icing_wspy_p,vpp)
7375 ! ALLOCATE(WSPDY(0:MT))
7376  wspdy = ftm%NEXT_WGHT * vnp + ftm%PREV_WGHT * vpp
7377 
7378 ! WSPD = sqrt(wspdy**2 + wspdx**2)
7379 ! wspd(0) = 0.0_sp
7380 ! deallocate(wspdy,wspdx)
7381 
7382  ! THE SEA SURFACE AIR TEMP
7383  CALL update_var_bracket(icing_file,icing_sat_p,icing_sat_n,wtime,status)
7384  IF (status /= 0) THEN
7385  CALL fatal_error("COULD NOT UPATE Surface Air Temp BRACKET: BOUNDS EXCEEDED?")
7386  end if
7387 
7388  CALL nc_point_var(icing_sat_n,vnp)
7389  CALL nc_point_var(icing_sat_p,vpp)
7390  sat = ftm%NEXT_WGHT * vnp + ftm%PREV_WGHT * vpp -k2c
7391 
7392 !===================================================
7393  CASE DEFAULT
7394  CALL fatal_error("UNKNOWN ICING_FORCING_TYPE IN UPDATE ICING")
7395  END SELECT
7396 !===================================================
7397 
7398 
character(len=80), parameter sttc
Definition: mod_main.f90:489
integer mt
Definition: mod_main.f90:78
character(len=80) icing_forcing_kind
Definition: mod_main.f90:721
character(len=80), parameter cnstnt
Definition: mod_main.f90:488
character(len=80), parameter vrbl
Definition: mod_main.f90:492
real(sp) icing_air_temp
Definition: mod_main.f90:722
character(len=80), parameter tmdpndnt
Definition: mod_main.f90:490
character(len=80), parameter prdc
Definition: mod_main.f90:491
real(sp) icing_wspd
Definition: mod_main.f90:723
Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_obc_salt()

subroutine, public mod_force::update_obc_salt ( type(time), intent(in)  NOW,
real(sp), dimension(:,:), allocatable  SALT 
)

Definition at line 7013 of file mod_force.f90.

7013  IMPLICIT NONE
7014  TYPE(TIME), INTENT(IN) :: NOW
7015  REAL(SP), ALLOCATABLE :: SALT(:,:)
7016  REAL(SP), POINTER :: VNP(:,:), VPP(:,:)
7017  TYPE(NCFTIME), POINTER :: FTM
7018  INTEGER :: STATUS
7019 
7020  IF(.NOT. ALLOCATED(salt)) CALL fatal_error &
7021  &("THE BOUNDARY SALINITY VARIABLE PASSED TO UPDATE IS NOT ALLOCATED")
7022 
7023  SELECT CASE(obc_s_type)
7024  CASE(obc_s_sigma)
7025 
7026  ftm => obc_s_file%FTIME
7027 
7028  ! OBC_SALT
7029  CALL update_var_bracket(obc_s_file,obc_s_p,obc_s_n,now,status)
7030  IF (status /= 0) THEN
7031  CALL fatal_error("COULD NOT UPATE OBC SALINITY BRACKET: BOUNDS EXCEEDED?")
7032  end if
7033 
7034  CALL nc_point_var(obc_s_n,vnp)
7035  CALL nc_point_var(obc_s_p,vpp)
7036  salt = ftm%NEXT_WGHT * vnp + ftm%PREV_WGHT * vpp
7037 
7038  CASE DEFAULT
7039  CALL fatal_error("UNKNOWN OBC SALINITY FILE TYPE IN UPDATE_OBC_SALT")
7040  END SELECT
7041 
7042 
Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_obc_temp()

subroutine, public mod_force::update_obc_temp ( type(time), intent(in)  NOW,
real(sp), dimension(:,:), allocatable  TEMP 
)

Definition at line 7046 of file mod_force.f90.

7046  IMPLICIT NONE
7047  TYPE(TIME), INTENT(IN) :: NOW
7048  REAL(SP), ALLOCATABLE :: TEMP(:,:)
7049  REAL(SP), POINTER :: VNP(:,:), VPP(:,:)
7050  TYPE(NCFTIME), POINTER :: FTM
7051  INTEGER :: STATUS
7052 
7053  IF(.NOT. ALLOCATED(temp)) CALL fatal_error &
7054  &("THE BOUNDARY TEMPERATURE VARIABLE PASSED TO UPDATE IS NOT ALLOCATED")
7055 
7056  SELECT CASE(obc_t_type)
7057  CASE(obc_t_sigma)
7058 
7059  ftm => obc_t_file%FTIME
7060 
7061  ! PRECIPITATION
7062  CALL update_var_bracket(obc_t_file,obc_t_p,obc_t_n,now,status)
7063  IF (status /= 0) THEN
7064  CALL fatal_error("COULD NOT UPATE OBC TEMPERATURE BRACKET: BOUNDS EXCEEDED?")
7065  end if
7066 
7067  CALL nc_point_var(obc_t_n,vnp)
7068  CALL nc_point_var(obc_t_p,vpp)
7069  temp = ftm%NEXT_WGHT * vnp + ftm%PREV_WGHT * vpp
7070 
7071  CASE DEFAULT
7072  CALL fatal_error("UNKNOWN OBC TEMPERATURE FILE TYPE IN UPDATE_OBC_TEMP")
7073  END SELECT
7074 
7075 
Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_precipitation()

subroutine, public mod_force::update_precipitation ( type(time), intent(in)  NOW,
real(sp), dimension(:), allocatable  Qprec,
real(sp), dimension(:), allocatable  Qevap 
)

Definition at line 6593 of file mod_force.f90.

6593  IMPLICIT NONE
6594  TYPE(TIME), INTENT(IN) :: NOW
6595  TYPE(TIME) :: PTIME
6596  REAL(SP), ALLOCATABLE :: QEVAP(:),QPREC(:)
6597  REAL(SP), POINTER :: VNP(:), VPP(:)
6598  TYPE(NCFTIME), POINTER :: FTM
6599  INTEGER :: STATUS
6600 
6601  IF(.NOT. ALLOCATED(qprec)) CALL fatal_error &
6602  &("THE PRECIPITATION VARIABLE PASSED TO UPDATE IS NOT ALLOCATED")
6603  IF(.NOT. ALLOCATED(qevap)) CALL fatal_error &
6604  &("THE EVAPORATION VARIABLE PASSED TO UPDATE IS NOT ALLOCATED")
6605 
6606 !===================================================
6607  SELECT CASE(precipitation_kind)
6608 !===================================================
6609  CASE (cnstnt)
6610 
6613 
6614  RETURN
6615 
6616  CASE(sttc)
6617 
6618  CALL fatal_error("STATIC PRECIP Not Set Up Yet")
6619 
6620  CASE(tmdpndnt)
6621 
6622  CALL fatal_error("TIME DEPENDANT PRECIP Not Set Up Yet")
6623 
6624  CASE(prdc)
6625 
6626  ! TO SET ZERO TIME PHASE USING RUNFILE START TIME
6627 ! PTIME= NOW - RUNFILE_StartTime
6628 
6629  ! TO USE ZERO AS THE PHASE OF THE FORCING
6630  ptime= now
6631 
6632 
6633  ptime = mod(ptime,precip_period)
6634 
6635  CASE(vrbl)
6636 
6637  ptime = now
6638  END SELECT
6639 !===================================================
6640 !===================================================
6641 
6642 
6643 
6644 
6645 !===================================================
6646  SELECT CASE(precip_forcing_type)
6647 !===================================================
6648  CASE(precip_is_wrfgrid)
6649 
6650  ftm => precip_file%FTIME
6651 
6652  ! PRECIPITATION
6653  CALL update_var_bracket(precip_file,precip_pre_p,precip_pre_n,ptime,status,precip_intp_n)
6654  IF (status /= 0) THEN
6655  CALL fatal_error("COULD NOT UPATE PRECIP BRACKET: BOUNDS EXCEEDED?")
6656  end if
6657 
6658  CALL nc_point_var(precip_pre_n,vnp)
6659  CALL nc_point_var(precip_pre_p,vpp)
6660  qprec = ftm%NEXT_WGHT * vnp + ftm%PREV_WGHT * vpp
6661 
6662  ! EVAPORATION
6663  CALL update_var_bracket(precip_file,precip_evp_p,precip_evp_n,ptime,status,precip_intp_n)
6664  IF (status /= 0) THEN
6665  CALL fatal_error("COULD NOT UPATE EVAP BRACKET: BOUNDS EXCEEDED?")
6666  end if
6667 
6668  CALL nc_point_var(precip_evp_n,vnp)
6669  CALL nc_point_var(precip_evp_p,vpp)
6670  qevap = ftm%NEXT_WGHT * vnp + ftm%PREV_WGHT * vpp
6671 !===================================================
6672  CASE(precip_is_fvcomgrid)
6673 !===================================================
6674 
6675  ftm => precip_file%FTIME
6676 
6677  ! PRECIPITATION
6678  CALL update_var_bracket(precip_file,precip_pre_p,precip_pre_n,ptime,status)
6679  IF (status /= 0) THEN
6680  CALL fatal_error("COULD NOT UPATE PRECIP BRACKET: BOUNDS EXCEEDED?")
6681  end if
6682 
6683  CALL nc_point_var(precip_pre_n,vnp)
6684  CALL nc_point_var(precip_pre_p,vpp)
6685  qprec = ftm%NEXT_WGHT * vnp + ftm%PREV_WGHT * vpp
6686 
6687  ! EVAPORATION
6688  CALL update_var_bracket(precip_file,precip_evp_p,precip_evp_n,ptime,status)
6689  IF (status /= 0) THEN
6690  CALL fatal_error("COULD NOT UPATE EVAP BRACKET: BOUNDS EXCEEDED?")
6691  end if
6692 
6693  CALL nc_point_var(precip_evp_n,vnp)
6694  CALL nc_point_var(precip_evp_p,vpp)
6695  qevap = ftm%NEXT_WGHT * vnp + ftm%PREV_WGHT * vpp
6696 
6697  CASE DEFAULT
6698  CALL fatal_error("UNKNOWN WINDS_FORCING_TYPE IN UPDATE PRECIPITATION")
6699  END SELECT
6700 
6701 
real(sp) precipitation_evp
Definition: mod_main.f90:469
character(len=80), parameter sttc
Definition: mod_main.f90:489
real(sp), dimension(:), allocatable, target qprec
Definition: mod_main.f90:1239
integer mt
Definition: mod_main.f90:78
character(len=80) precipitation_kind
Definition: mod_main.f90:468
real(sp), dimension(:), allocatable, target qevap
Definition: mod_main.f90:1240
character(len=80), parameter cnstnt
Definition: mod_main.f90:488
character(len=80), parameter vrbl
Definition: mod_main.f90:492
real(sp) precipitation_prc
Definition: mod_main.f90:470
character(len=80), parameter tmdpndnt
Definition: mod_main.f90:490
character(len=80), parameter prdc
Definition: mod_main.f90:491
Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_rivers()

subroutine, public mod_force::update_rivers ( type(time), intent(in)  NOW,
real(sp), dimension(:), allocatable  FLUX,
real(sp), dimension(:), optional, allocatable  TEMP,
real(sp), dimension(:), optional, allocatable  SALT,
real(sp), dimension(:,:), optional, allocatable  WQM,
real(sp), dimension(:,:), optional, allocatable  SED,
real(sp), dimension(:,:), optional, allocatable  BIO 
)

Definition at line 6032 of file mod_force.f90.

6032  IMPLICIT NONE
6033  TYPE(TIME), INTENT(IN) :: NOW
6034  REAL(SP), ALLOCATABLE :: FLUX(:)
6035  REAL(SP), ALLOCATABLE, OPTIONAL :: TEMP(:)
6036  REAL(SP), ALLOCATABLE, OPTIONAL :: SALT(:)
6037  REAL(SP), ALLOCATABLE, OPTIONAL :: WQM(:,:)
6038  REAL(SP), ALLOCATABLE, OPTIONAL :: SED(:,:)
6039  REAL(SP), ALLOCATABLE, OPTIONAL :: BIO(:,:)
6040 
6041  REAL(SP), POINTER :: VNP(:), VPP(:)
6042 
6043  REAL(SP), ALLOCATABLE :: CURRENT(:)
6044  TYPE(TIME) :: RIVTIME
6045 
6046  TYPE(NCFILE), POINTER :: NCF
6047  TYPE(NCVAR), POINTER :: VAR_N
6048  TYPE(NCVAR), POINTER :: VAR_P
6049  TYPE(NCFTIME), POINTER :: FTM
6050  INTEGER :: STATUS, I, J, NRSF,IND,NS
6051 
6052  IF(.NOT. ALLOCATED(flux)) CALL fatal_error &
6053  &("THE RIVER FLUX VARIABLE PASSED TO UPDATE IS NOT ALLOCATED")
6054 
6055  IF(PRESENT(temp)) THEN
6056  IF(.NOT. ALLOCATED(temp)) CALL fatal_error &
6057  &("THE RIVER TEMP VARIABLE PASSED TO UPDATE IS NOT ALLOCATED")
6058  END IF
6059 
6060  IF(PRESENT(salt)) THEN
6061  IF(.NOT. ALLOCATED(salt)) CALL fatal_error &
6062  &("THE RIVER SALT VARIABLE PASSED TO UPDATE IS NOT ALLOCATED")
6063  END IF
6064 
6065 
6066  DO i = 1, SIZE(river_forcing) ! (NUMBER OF FILES)
6067 
6068  SELECT CASE (river_kind)
6069  CASE(prdc)
6070 
6071  ! TO SET ZERO TIME PHASE USING RUNFILE START TIME
6072 ! RIVTIME= NOW - RUNFILE_StartTime
6073 
6074  ! TO USE ZERO AS THE PHASE OF THE FORCING
6075  rivtime= now
6076 
6077 
6078  rivtime = mod(rivtime,river_forcing(i)%RIVER_PERIOD)
6079 
6080  CASE(vrbl)
6081 
6082 
6083  rivtime = now
6084  END SELECT
6085 
6086 
6087  ncf => river_forcing(i)%NCF
6088  ftm => ncf%FTIME
6089 
6090  nrsf = river_forcing(i)%RIVERS_IN_FILE
6091 
6092  ! RIVER FLUX
6093  var_n => river_forcing(i)%FLUX_N
6094  var_p => river_forcing(i)%FLUX_P
6095  CALL update_var_bracket(ncf,var_p,var_n,rivtime,status)
6096  IF (status /= 0) THEN
6097  CALL fatal_error("COULD NOT UPATE RIVER_FILE TIME BRACKET: BOUNDS EXCEEDED?")
6098  end if
6099 
6100  ALLOCATE(current(nrsf))
6101 
6102  CALL nc_point_var(var_n,vnp)
6103  CALL nc_point_var(var_p,vpp)
6104 
6105  !====================================================
6106  ! Linear interpolation between time points
6107  !CURRENT = FTM%NEXT_WGHT * VNP + FTM%PREV_WGHT * VPP
6108  !
6109  ! OR
6110  !
6111  ! Nearest time sets the value
6112  current = vnp
6113  if (ftm%PREV_WGHT .gt. 0.5_sp) current = vpp
6114  !====================================================
6115 
6116  DO j =1,nrsf
6117  ind = river_forcing(i)%RIV_FILE2LOC(j)
6118  IF(ind /= 0) flux(ind) = current(j)
6119  END DO
6120 
6121  DEALLOCATE(current)
6122 
6123  IF(PRESENT(salt)) THEN
6124 
6125  ! RIVER SALT
6126  var_n => river_forcing(i)%SALT_N
6127  var_p => river_forcing(i)%SALT_P
6128  CALL update_var_bracket(ncf,var_p,var_n,rivtime,status)
6129  IF (status /= 0) THEN
6130  CALL fatal_error("COULD NOT UPATE RIVER_FILE TIME BRACKET: BOUNDS EXCEEDED?")
6131  end if
6132 
6133  ALLOCATE(current(nrsf))
6134 
6135  CALL nc_point_var(var_n,vnp)
6136  CALL nc_point_var(var_p,vpp)
6137 
6138  !====================================================
6139  ! Linear interpolation between time points
6140  !CURRENT = FTM%NEXT_WGHT * VNP + FTM%PREV_WGHT * VPP
6141  !
6142  ! OR
6143  !
6144  ! Nearest time sets the value
6145  current = vnp
6146  if (ftm%PREV_WGHT .gt. 0.5_sp) current = vpp
6147  !====================================================
6148 
6149 
6150  DO j =1,nrsf
6151  ind = river_forcing(i)%RIV_FILE2LOC(j)
6152  IF(ind /= 0) salt(ind) = current(j)
6153  END DO
6154 
6155  DEALLOCATE(current)
6156  END IF
6157 
6158  IF(PRESENT(temp)) THEN
6159 
6160  ! RIVER TEMP
6161  var_n => river_forcing(i)%TEMP_N
6162  var_p => river_forcing(i)%TEMP_P
6163  CALL update_var_bracket(ncf,var_p,var_n,rivtime,status)
6164  IF (status /= 0) THEN
6165  CALL fatal_error("COULD NOT UPATE RIVER_FILE TIME BRACKET: BOUNDS EXCEEDED?")
6166  end if
6167 
6168  ALLOCATE(current(nrsf))
6169 
6170  CALL nc_point_var(var_n,vnp)
6171  CALL nc_point_var(var_p,vpp)
6172 
6173  !====================================================
6174  ! Linear interpolation between time points
6175  !CURRENT = FTM%NEXT_WGHT * VNP + FTM%PREV_WGHT * VPP
6176  !
6177  ! OR
6178  !
6179  ! Nearest time sets the value
6180  current = vnp
6181  if (ftm%PREV_WGHT .gt. 0.5_sp) current = vpp
6182  !====================================================
6183 
6184  DO j =1,nrsf
6185  ind = river_forcing(i)%RIV_FILE2LOC(j)
6186  IF(ind /= 0) temp(ind) = current(j)
6187  END DO
6188 
6189  DEALLOCATE(current)
6190  END IF
6191 
6192 
6193 
6194 
6195  END DO ! FOR EACH FILE
6196 
character(len=80) river_kind
Definition: mod_main.f90:541
character(len=80), parameter vrbl
Definition: mod_main.f90:492
character(len=80), parameter prdc
Definition: mod_main.f90:491
Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_tide()

subroutine, public mod_force::update_tide ( type(time), intent(in)  NOW,
real(sp), dimension(:), allocatable  BND_ELV 
)

Definition at line 6979 of file mod_force.f90.

6979  IMPLICIT NONE
6980  TYPE(TIME), INTENT(IN) :: NOW
6981  REAL(SP), ALLOCATABLE :: BND_ELV(:)
6982  REAL(SP), POINTER :: VNP(:), VPP(:)
6983  TYPE(NCFTIME), POINTER :: FTM
6984  INTEGER :: STATUS
6985 
6986  IF(.NOT. ALLOCATED(bnd_elv)) CALL fatal_error &
6987  &("THE BOUNDARY ELEVATION VARIABLE PASSED TO UPDATE IS NOT ALLOCATED")
6988 
6989 
6990  SELECT CASE(tide_forcing_type)
6992 
6993  ftm => tide_file%FTIME
6994 
6995  ! PRECIPITATION
6996  CALL update_var_bracket(tide_file,tide_elv_p,tide_elv_n,now,status)
6997  IF (status /= 0) THEN
6998  CALL fatal_error("COULD NOT UPATE TIDE ELVATION BRACKET: BOUNDS EXCEEDED?")
6999  end if
7000 
7001  CALL nc_point_var(tide_elv_n,vnp)
7002  CALL nc_point_var(tide_elv_p,vpp)
7003  bnd_elv = ftm%NEXT_WGHT * vnp + ftm%PREV_WGHT * vpp
7004 
7005  CASE DEFAULT
7006  CALL fatal_error("UNKNOWN TIDAL FORCING FILE TYPE IN UPDATE_TIDE")
7007  END SELECT
7008 
7009 
integer, public tide_forcing_type
Definition: mod_force.f90:78
integer, parameter, public tide_forcing_timeseries
Definition: mod_force.f90:80
Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_wave()

subroutine, public mod_force::update_wave ( type(time), intent(in)  NOW,
real(sp), dimension(:), allocatable  WHS,
real(sp), dimension(:), allocatable  WDIR,
real(sp), dimension(:), allocatable  WPER,
real(sp), dimension(:), allocatable  WLENGTH,
real(sp), dimension(:), allocatable  WPER_BOT,
real(sp), dimension(:), allocatable  WUB_BOT 
)

Definition at line 6708 of file mod_force.f90.

6708  IMPLICIT NONE
6709  TYPE(TIME), INTENT(IN) :: NOW
6710  TYPE(TIME) :: PTIME
6711  REAL(SP), ALLOCATABLE :: WHS(:),WDIR(:),WPER(:),WLENGTH(:),WPER_BOT(:),WUB_BOT(:)
6712  REAL(SP), POINTER :: VNP(:), VPP(:)
6713  TYPE(NCFTIME), POINTER :: FTM
6714  INTEGER :: STATUS
6715 
6716  REAL :: X1,X2,Y1,Y2,X0,Y0,ANGLE
6717  INTEGER :: I
6718 
6719  real:: a2, K2,H2,T2,Ub2,w2
6720 
6721  IF(.NOT. ALLOCATED(whs)) CALL fatal_error &
6722  &("THE WAVE HEIGHT VARIABLE PASSED TO UPDATE IS NOT ALLOCATED")
6723  IF(.NOT. ALLOCATED(wdir)) CALL fatal_error &
6724  &("THE WAVE DIRECTION VARIABLE PASSED TO UPDATE IS NOT ALLOCATED")
6725  IF(.NOT. ALLOCATED(wper)) CALL fatal_error &
6726  &("THE WAVE PERIOD VARIABLE PASSED TO UPDATE IS NOT ALLOCATED")
6727  IF(.NOT. ALLOCATED(wlength)) CALL fatal_error &
6728  &("THE WAVE LENGTH VARIABLE PASSED TO UPDATE IS NOT ALLOCATED")
6729  IF(.NOT. ALLOCATED(wper_bot)) CALL fatal_error &
6730  &("THE BOTTOM WAVE PERIOD VARIABLE PASSED TO UPDATE IS NOT ALLOCATED")
6731  IF(.NOT. ALLOCATED(wub_bot)) CALL fatal_error &
6732  &("THE BOTTOM WAVE ORBITAL VELOCITY VARIABLE PASSED TO UPDATE IS NOT ALLOCATED")
6733 
6734 !===================================================
6735  SELECT CASE(wave_kind)
6736 !===================================================
6737  CASE (cnstnt)
6738 
6739  whs(1:mt) = wave_height
6740  wdir(1:mt) = wave_direction
6741  wper(1:mt) = wave_period
6742  wlength(1:mt) = wave_length
6743  wper_bot(1:mt) = wave_per_bot
6744  wub_bot(1:mt) = wave_ub_bot
6745 
6746  RETURN
6747 
6748  CASE(sttc)
6749 
6750  CALL fatal_error("STATIC PRECIP Not Set Up Yet")
6751 
6752  CASE(tmdpndnt)
6753 
6754  CALL fatal_error("TIME DEPENDANT PRECIP Not Set Up Yet")
6755 
6756  CASE(prdc)
6757 
6758  ! TO SET ZERO TIME PHASE USING RUNFILE START TIME
6759 ! PTIME= NOW - RUNFILE_StartTime
6760 
6761  ! TO USE ZERO AS THE PHASE OF THE FORCING
6762  ptime= now
6763 
6764 
6765  ptime = mod(ptime,precip_period)
6766 
6767  CASE(vrbl)
6768 
6769  ptime = now
6770  END SELECT
6771 !===================================================
6772 !===================================================
6773 
6774 
6775 
6776 
6777 !===================================================
6778  SELECT CASE(waves_forcing_type)
6779 !===================================================
6780  CASE(waves_are_wrfgrid)
6781 
6782 !===================================================
6783  CASE(waves_are_fvcomgrid)
6784 !===================================================
6785 
6786  ftm => waves_file%FTIME
6787 
6788  ! WAVE HEIGHT
6789  CALL update_var_bracket(waves_file,waves_height_p,waves_height_n,ptime,status)
6790  IF (status /= 0) THEN
6791  CALL fatal_error("COULD NOT UPATE WAVE HEIGHT BRACKET: BOUNDS EXCEEDED?")
6792  end if
6793 
6794  CALL nc_point_var(waves_height_n,vnp)
6795  CALL nc_point_var(waves_height_p,vpp)
6796  whs = ftm%NEXT_WGHT * vnp + ftm%PREV_WGHT * vpp
6797 
6798  ! WAVE DIRECTIION
6799  CALL update_var_bracket(waves_file,waves_direction_p,waves_direction_n,ptime,status)
6800  IF (status /= 0) THEN
6801  CALL fatal_error("COULD NOT UPATE WAVE DIRECTION BRACKET: BOUNDS EXCEEDED?")
6802  end if
6803 
6804  CALL nc_point_var(waves_direction_n,vnp)
6805  CALL nc_point_var(waves_direction_p,vpp)
6806  wdir = ftm%NEXT_WGHT * vnp + ftm%PREV_WGHT * vpp
6807 
6808  DO i=1,mt
6809  x1 = cos(vnp(i)*3.1415926/180.0)
6810  x2 = cos(vpp(i)*3.1415926/180.0)
6811  y1 = sin(vnp(i)*3.1415926/180.0)
6812  y2 = sin(vpp(i)*3.1415926/180.0)
6813  x0 = ftm%NEXT_WGHT * x1 + ftm%PREV_WGHT * x2
6814  y0 = ftm%NEXT_WGHT * y1 + ftm%PREV_WGHT * y2
6815  angle = atan2(y0,x0)
6816  IF(angle<0)angle = angle + 3.1415926*2.0
6817  wdir(i) = angle*180.0/3.1415926
6818  END DO
6819 
6820 
6821  ! WAVE LENGTH
6822  CALL update_var_bracket(waves_file,waves_length_p,waves_length_n,ptime,status)
6823  IF (status /= 0) THEN
6824  CALL fatal_error("COULD NOT UPATE WAVE LENGTH BRACKET: BOUNDS EXCEEDED?")
6825  end if
6826 
6827  CALL nc_point_var(waves_length_n,vnp)
6828  CALL nc_point_var(waves_length_p,vpp)
6829  wlength = ftm%NEXT_WGHT * vnp + ftm%PREV_WGHT * vpp
6830 
6831 
6832  ! WAVE PERIOD
6833  CALL update_var_bracket(waves_file,waves_period_p,waves_period_n,ptime,status)
6834  IF (status /= 0) THEN
6835  CALL fatal_error("COULD NOT UPATE WAVE PERIOD BRACKET: BOUNDS EXCEEDED?")
6836  end if
6837 
6838  CALL nc_point_var(waves_period_n,vnp)
6839  CALL nc_point_var(waves_period_p,vpp)
6840  wper = ftm%NEXT_WGHT * vnp + ftm%PREV_WGHT * vpp
6841 
6842 
6843  ! BOTTOM WAVE PERIOD
6844  CALL update_var_bracket(waves_file,waves_per_bot_p,waves_per_bot_n,ptime,status)
6845  IF (status /= 0) THEN
6846  CALL fatal_error("COULD NOT UPATE BOTTOM WAVE PERIOD BRACKET: BOUNDS EXCEEDED?")
6847  end if
6848 
6849  CALL nc_point_var(waves_per_bot_n,vnp)
6850  CALL nc_point_var(waves_per_bot_p,vpp)
6851  wper_bot = ftm%NEXT_WGHT * vnp + ftm%PREV_WGHT * vpp
6852 
6853 
6854  ! BOTTOM ORBITAL VELOCITY
6855  CALL update_var_bracket(waves_file,waves_ub_bot_p,waves_ub_bot_n,ptime,status)
6856  IF (status /= 0) THEN
6857  CALL fatal_error("COULD NOT UPATE BOTTOM ORBITAL VELOCITY BRACKET: BOUNDS EXCEEDED?")
6858  end if
6859 
6860  CALL nc_point_var(waves_ub_bot_n,vnp)
6861  CALL nc_point_var(waves_ub_bot_p,vpp)
6862  wub_bot = ftm%NEXT_WGHT * vnp + ftm%PREV_WGHT * vpp
6863 ! print*,whs(36),wper(36),wlength(36)
6864 !---------------------------------------------------------------------!
6865 ! Test bottom orbital velocity
6866 !---------------------------------------------------------------------!
6867 ! a2=0.5*whs(159)
6868 ! K2=2.0*3.1415926/wlength(159)
6869 ! H2=10.0
6870 ! T2=wper(159)
6871 ! w2=sqrt(9.8*K2*SINH(K2*H2)/COSH(K2*H2))
6872 ! Ub2=a2*W2/sinh(H2*K2)
6873 ! print*,whs(159),ub2
6874 
6875 
6876  CASE DEFAULT
6877  CALL fatal_error("UNKNOWN WAVES_FORCING_TYPE IN UPDATE WAVE")
6878  END SELECT
6879 
6880 
character(len=80) wave_kind
Definition: mod_main.f90:479
character(len=80), parameter sttc
Definition: mod_main.f90:489
real(sp) wave_ub_bot
Definition: mod_main.f90:485
integer mt
Definition: mod_main.f90:78
real(sp), dimension(:), allocatable, target wper
Definition: mod_main.f90:1244
real(sp), dimension(:), allocatable, target wub_bot
Definition: mod_main.f90:1247
real(sp) wave_period
Definition: mod_main.f90:483
real(sp), dimension(:), allocatable, target wlength
Definition: mod_main.f90:1245
real(sp), dimension(:), allocatable, target wdir
Definition: mod_main.f90:1243
real(sp), dimension(:), allocatable, target wper_bot
Definition: mod_main.f90:1246
real(sp) wave_direction
Definition: mod_main.f90:482
real(sp) wave_height
Definition: mod_main.f90:480
character(len=80), parameter cnstnt
Definition: mod_main.f90:488
character(len=80), parameter vrbl
Definition: mod_main.f90:492
real(sp), dimension(:), allocatable, target whs
Definition: mod_main.f90:1242
real(sp) wave_length
Definition: mod_main.f90:481
character(len=80), parameter tmdpndnt
Definition: mod_main.f90:490
real(sp) wave_per_bot
Definition: mod_main.f90:484
character(len=80), parameter prdc
Definition: mod_main.f90:491
Here is the call graph for this function:

◆ update_wind()

subroutine, public mod_force::update_wind ( type(time), intent(in)  NOW,
real(sp), dimension(:), allocatable  wstrx,
real(sp), dimension(:), allocatable  wstry 
)

Definition at line 6449 of file mod_force.f90.

6449  IMPLICIT NONE
6450  TYPE(TIME), INTENT(IN) :: NOW
6451  TYPE(TIME) :: WTIME
6452  REAL(SP), ALLOCATABLE :: wstrx(:),wstry(:)
6453  REAL(SP), POINTER :: VNP(:), VPP(:)
6454  TYPE(NCFTIME), POINTER :: FTM
6455  INTEGER :: STATUS
6456 
6457 
6458  IF(.NOT. ALLOCATED(wstrx)) CALL fatal_error &
6459  &("THE WIND VARIABLE PASSED TO UPDATE IS NOT ALLOCATED")
6460  IF(.NOT. ALLOCATED(wstry)) CALL fatal_error &
6461  &("THE WIND VARIABLE PASSED TO UPDATE IS NOT ALLOCATED")
6462 
6463 
6464 !===================================================
6465  SELECT CASE(wind_kind)
6466 !===================================================
6467  CASE (cnstnt)
6468 
6469  wstrx(1:nt) = wind_x
6470  wstry(1:nt) = wind_y
6471 
6472  RETURN
6473 
6474  CASE(sttc)
6475 
6476  CALL fatal_error("STATIC WIND Not Set Up Yet")
6477 
6478  CASE(tmdpndnt)
6479 
6480  CALL fatal_error("TIME DEPENDANT WIND Not Set Up Yet")
6481 
6482  CASE(prdc)
6483 
6484  ! TO SET ZERO TIME PHASE USING RUNFILE START TIME
6485 ! WTIME= NOW - RUNFILE_StartTime
6486 
6487  ! TO USE ZERO AS THE PHASE OF THE FORCING
6488  wtime= now
6489 
6490 
6491  wtime = mod(wtime,winds_period)
6492 
6493  CASE(vrbl)
6494 
6495  wtime = now
6496  END SELECT
6497 !===================================================
6498 !===================================================
6499 
6500 
6501 !===================================================
6502  SELECT CASE(winds_forcing_type)
6503 !===================================================
6504  CASE(winds_are_wrfgrid)
6505 
6506  ftm => winds_file%FTIME
6507 
6508  ! THE X DIRECTION WIND STRESS
6509  CALL update_var_bracket(winds_file,winds_strx_p,winds_strx_n,wtime,status,winds_intp_c)
6510  IF (status /= 0) THEN
6511  CALL fatal_error("COULD NOT UPATE WIND X BRACKET: BOUNDS EXCEEDED?")
6512  end if
6513 
6514  CALL nc_point_var(winds_strx_n,vnp)
6515  CALL nc_point_var(winds_strx_p,vpp)
6516  wstrx = ftm%NEXT_WGHT * vnp + ftm%PREV_WGHT * vpp
6517 
6518  ! THE Y DIRECTION WIND STRESS
6519  CALL update_var_bracket(winds_file,winds_stry_p,winds_stry_n,wtime,status,winds_intp_c)
6520  IF (status /= 0) THEN
6521  CALL fatal_error("COULD NOT UPATE WIND Y BRACKET: BOUNDS EXCEEDED?")
6522  end if
6523 
6524  CALL nc_point_var(winds_stry_n,vnp)
6525  CALL nc_point_var(winds_stry_p,vpp)
6526  wstry = ftm%NEXT_WGHT * vnp + ftm%PREV_WGHT * vpp
6527 !===================================================
6528  CASE(winds_are_fvcomgrid)
6529 !===================================================
6530  ftm => winds_file%FTIME
6531 
6532  ! THE X DIRECTION WIND STRESS
6533  CALL update_var_bracket(winds_file,winds_strx_p,winds_strx_n,wtime,status)
6534  IF (status /= 0) THEN
6535  CALL fatal_error("COULD NOT UPATE WIND X BRACKET: BOUNDS EXCEEDED?")
6536  end if
6537 
6538  CALL nc_point_var(winds_strx_n,vnp)
6539  CALL nc_point_var(winds_strx_p,vpp)
6540  wstrx = ftm%NEXT_WGHT * vnp + ftm%PREV_WGHT * vpp
6541 
6542  ! THE Y DIRECTION WIND STRESS
6543  CALL update_var_bracket(winds_file,winds_stry_p,winds_stry_n,wtime,status)
6544  IF (status /= 0) THEN
6545  CALL fatal_error("COULD NOT UPATE WIND Y BRACKET: BOUNDS EXCEEDED?")
6546  end if
6547 
6548  CALL nc_point_var(winds_stry_n,vnp)
6549  CALL nc_point_var(winds_stry_p,vpp)
6550  wstry = ftm%NEXT_WGHT * vnp + ftm%PREV_WGHT * vpp
6551 
6552 !===================================================
6553  CASE(winds_are_pt_source)
6554 !===================================================
6555  ftm => winds_file%FTIME
6556 
6557  ! THE X DIRECTION WIND STRESS
6558  CALL update_var_bracket(winds_file,winds_strx_p,winds_strx_n,wtime,status)
6559  IF (status /= 0) THEN
6560  CALL fatal_error("COULD NOT UPATE WIND X BRACKET: BOUNDS EXCEEDED?")
6561  end if
6562 
6563  CALL nc_point_var(winds_strx_n,vnp)
6564  CALL nc_point_var(winds_strx_p,vpp)
6565  wstrx(1:nt) = ftm%NEXT_WGHT * vnp(1) + ftm%PREV_WGHT * vpp(1)
6566 
6567  ! THE Y DIRECTION WIND STRESS
6568  CALL update_var_bracket(winds_file,winds_stry_p,winds_stry_n,wtime,status)
6569  IF (status /= 0) THEN
6570  CALL fatal_error("COULD NOT UPATE WIND Y BRACKET: BOUNDS EXCEEDED?")
6571  end if
6572 
6573  CALL nc_point_var(winds_stry_n,vnp)
6574  CALL nc_point_var(winds_stry_p,vpp)
6575  wstry(1:nt) = ftm%NEXT_WGHT * vnp(1) + ftm%PREV_WGHT * vpp(1)
6576 
6577 !===================================================
6578  CASE DEFAULT
6579  CALL fatal_error("UNKNOWN WINDS_FORCING_TYPE IN UPDATE WIND")
6580  END SELECT
6581 !===================================================
6582 
character(len=80), parameter sttc
Definition: mod_main.f90:489
real(sp) wind_y
Definition: mod_main.f90:448
character(len=80) wind_kind
Definition: mod_main.f90:446
character(len=80), parameter cnstnt
Definition: mod_main.f90:488
character(len=80), parameter vrbl
Definition: mod_main.f90:492
character(len=80), parameter tmdpndnt
Definition: mod_main.f90:490
integer nt
Definition: mod_main.f90:77
character(len=80), parameter prdc
Definition: mod_main.f90:491
real(sp) wind_x
Definition: mod_main.f90:447
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ airpressure_forcing_comments

character(len=char_max_attlen), dimension(:), allocatable, public mod_force::airpressure_forcing_comments

Definition at line 238 of file mod_force.f90.

238  CHARACTER(LEN=Char_max_attlen), PUBLIC, ALLOCATABLE :: AIRPRESSURE_FORCING_COMMENTS(:)

◆ fvcom_cap_grid_source

character(len=80), parameter, public mod_force::fvcom_cap_grid_source = "FVCOM grid (unstructured) surface forcing"

Definition at line 67 of file mod_force.f90.

67  CHARACTER(LEN=80),PUBLIC, PARAMETER :: fvcom_cap_grid_SOURCE = &
68  & "FVCOM grid (unstructured) surface forcing"

◆ fvcom_grid_source

character(len=80), parameter, public mod_force::fvcom_grid_source = "fvcom grid (unstructured) surface forcing"

Definition at line 64 of file mod_force.f90.

64  CHARACTER(LEN=80),PUBLIC, PARAMETER :: fvcom_grid_SOURCE = &
65  & "fvcom grid (unstructured) surface forcing"

◆ gwater_forcing_comments

character(len=char_max_attlen), dimension(:), allocatable, public mod_force::gwater_forcing_comments

Definition at line 121 of file mod_force.f90.

121  CHARACTER(LEN=Char_max_attlen), PUBLIC, ALLOCATABLE :: GWATER_FORCING_COMMENTS(:)

◆ heat_calculate_comments

character(len=char_max_attlen), dimension(:), allocatable, public mod_force::heat_calculate_comments

Definition at line 160 of file mod_force.f90.

160  CHARACTER(LEN=Char_max_attlen), PUBLIC, ALLOCATABLE :: HEAT_CALCULATE_COMMENTS(:)

◆ heat_forcing_comments

character(len=char_max_attlen), dimension(:), allocatable, public mod_force::heat_forcing_comments

Definition at line 159 of file mod_force.f90.

159  CHARACTER(LEN=Char_max_attlen), PUBLIC, ALLOCATABLE :: HEAT_FORCING_COMMENTS(:)

◆ heat_solar_comments

character(len=char_max_attlen), dimension(:), allocatable, public mod_force::heat_solar_comments

Definition at line 161 of file mod_force.f90.

161  CHARACTER(LEN=Char_max_attlen), PUBLIC, ALLOCATABLE :: HEAT_SOLAR_COMMENTS(:)

◆ ice_forcing_comments

character(len=char_max_attlen), dimension(:), allocatable, public mod_force::ice_forcing_comments

Definition at line 254 of file mod_force.f90.

254  CHARACTER(LEN=Char_max_attlen), PUBLIC, ALLOCATABLE:: ICE_FORCING_COMMENTS(:)

◆ icing_forcing_comments

character(len=char_max_attlen), dimension(:), allocatable, public mod_force::icing_forcing_comments

Definition at line 272 of file mod_force.f90.

272  CHARACTER(LEN=Char_max_attlen), PUBLIC, ALLOCATABLE:: ICING_FORCING_COMMENTS(:)

◆ obc_s_comments

character(len=char_max_attlen), public mod_force::obc_s_comments

Definition at line 131 of file mod_force.f90.

131  CHARACTER(LEN=Char_max_attlen), PUBLIC :: OBC_S_COMMENTS

◆ obc_t_comments

character(len=char_max_attlen), public mod_force::obc_t_comments

Definition at line 139 of file mod_force.f90.

139  CHARACTER(LEN=Char_max_attlen), PUBLIC :: OBC_T_COMMENTS

◆ precip_forcing_comments

character(len=char_max_attlen), dimension(:), allocatable, public mod_force::precip_forcing_comments

Definition at line 222 of file mod_force.f90.

222  CHARACTER(LEN=Char_max_attlen), PUBLIC, ALLOCATABLE:: PRECIP_FORCING_COMMENTS(:)

◆ river_forcing_comments

character(len=char_max_attlen), dimension(:), allocatable, public mod_force::river_forcing_comments

Definition at line 88 of file mod_force.f90.

88  CHARACTER(LEN=Char_max_attlen), PUBLIC,ALLOCATABLE :: RIVER_FORCING_COMMENTS(:)

◆ surf_forcing_pt_source

character(len=80), parameter, public mod_force::surf_forcing_pt_source = "single-point time-dependent surface forcing"

Definition at line 73 of file mod_force.f90.

73  CHARACTER(LEN=80),PUBLIC, PARAMETER :: surf_forcing_pt_SOURCE = &
74  & "single-point time-dependent surface forcing"

◆ tide_forcing_comments

character(len=char_max_attlen), dimension(:), allocatable, public mod_force::tide_forcing_comments

Definition at line 83 of file mod_force.f90.

83  CHARACTER(LEN=Char_max_attlen), PUBLIC,ALLOCATABLE :: TIDE_FORCING_COMMENTS(:)

◆ tide_forcing_spectral

integer, parameter, public mod_force::tide_forcing_spectral = 1

Definition at line 79 of file mod_force.f90.

79  INTEGER, PARAMETER, PUBLIC :: TIDE_FORCING_SPECTRAL = 1

◆ tide_forcing_timeseries

integer, parameter, public mod_force::tide_forcing_timeseries = 2

Definition at line 80 of file mod_force.f90.

80  INTEGER, PARAMETER, PUBLIC :: TIDE_FORCING_TIMESERIES = 2

◆ tide_forcing_type

integer, public mod_force::tide_forcing_type

Definition at line 78 of file mod_force.f90.

78  INTEGER, PUBLIC :: TIDE_FORCING_TYPE

◆ waves_forcing_comments

character(len=char_max_attlen), dimension(:), allocatable, public mod_force::waves_forcing_comments

Definition at line 203 of file mod_force.f90.

203  CHARACTER(LEN=Char_max_attlen), PUBLIC, ALLOCATABLE :: WAVES_FORCING_COMMENTS(:)

◆ winds_forcing_comments

character(len=char_max_attlen), dimension(:), allocatable, public mod_force::winds_forcing_comments

Definition at line 181 of file mod_force.f90.

181  CHARACTER(LEN=Char_max_attlen), PUBLIC, ALLOCATABLE :: WINDS_FORCING_COMMENTS(:)

◆ wrf2fvcom_source

character(len=80), parameter, public mod_force::wrf2fvcom_source = "wrf2fvcom version"

Definition at line 61 of file mod_force.f90.

61  CHARACTER(LEN=80),PUBLIC, PARAMETER :: WRF2FVCOM_SOURCE = &
62  & "wrf2fvcom version"

◆ wrf_grid_source

character(len=80), parameter, public mod_force::wrf_grid_source = "wrf grid (structured) surface forcing"

Definition at line 70 of file mod_force.f90.

70  CHARACTER(LEN=80),PUBLIC, PARAMETER :: wrf_grid_SOURCE = &
71  & "wrf grid (structured) surface forcing"