-
Notifications
You must be signed in to change notification settings - Fork 818
Fix AHE option 2 and a problem with mosaic #2005
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -257,6 +257,7 @@ SUBROUTINE surface_driver( & | |
| & ,bldt,curr_secs,adapt_step_flag,bldtacttime & | ||
| ! Optional urban with BEP | ||
| & ,sf_urban_physics,gmt,xlat,xlong,julday & | ||
| & ,distributed_ahe_opt, ahe & !For anthropogenic heat | ||
| & ,num_urban_ndm & !multi-layer urban | ||
| & ,urban_map_zrd & !multi-layer urban | ||
| & ,urban_map_zwd & !multi-layer urban | ||
|
|
@@ -395,6 +396,7 @@ SUBROUTINE surface_driver( & | |
| USE module_sf_tmnupdate | ||
| USE module_sf_lake | ||
| USE module_cpl, ONLY : coupler_on, cpl_rcv | ||
| use module_ra_gfdleta, only: cal_mon_day | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This requires adding dependency in main/depend.common.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @weiwangncar Please check if I've added the dependency correctly. I think this the
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I agree it is odd that this comes from a radiation option that we don't use much but so far the urban options use it. |
||
| ! | ||
| ! This driver calls subroutines for the surface parameterizations. | ||
| ! | ||
|
|
@@ -942,6 +944,8 @@ SUBROUTINE surface_driver( & | |
| ! Variables for multi-layer UCM | ||
| REAL, OPTIONAL, INTENT(IN ) :: GMT | ||
| INTEGER, OPTIONAL, INTENT(IN ) :: JULDAY | ||
| INTEGER, INTENT(IN) :: distributed_ahe_opt | ||
| REAL, OPTIONAL, DIMENSION( ims:ime, 0:287, jms:jme ), INTENT(IN) :: ahe | ||
| REAL, OPTIONAL, DIMENSION( ims:ime, jms:jme ), INTENT(IN ) ::XLAT, XLONG | ||
| INTEGER , INTENT(IN) :: num_urban_ndm | ||
| INTEGER , INTENT(IN) :: urban_map_zrd | ||
|
|
@@ -1455,14 +1459,10 @@ SUBROUTINE surface_driver( & | |
|
|
||
| real, optional, dimension(ims:ime,jms:jme ),intent(inout) :: XLAIDYN | ||
| ! IRRIGATION | ||
| INTEGER :: tloc, jmonth,timing | ||
| REAL, PARAMETER :: PI_GRECO=3.14159 | ||
| INTEGER :: end_hour, irr_start,xt24,irr_day | ||
| REAL :: constants_irrigation | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK, this looks like valid clean-up
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @weiwangncar They are unused variables. Keeping them or removing them do not change the functionality of the program.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think as it has no effect, it can be combined but the PR should list it.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree with Jimy. |
||
| INTEGER :: ihour, jmonth, jday | ||
| REAL, DIMENSION( ims:ime, jms:jme ) :: IRRIGATION_CHANNEL | ||
| REAL, DIMENSION( ims:ime, jms:jme ), INTENT(IN) , OPTIONAL:: IRRIGATION | ||
| REAL, INTENT(IN),OPTIONAL:: irr_daily_amount | ||
| INTEGER :: phase | ||
| INTEGER, DIMENSION( ims:ime , jms:jme ), INTENT(INOUT),OPTIONAL :: irr_rand_field | ||
| INTEGER, INTENT(IN ),OPTIONAL:: sf_surf_irr_scheme,irr_start_hour,irr_num_hours,irr_start_julianday,irr_end_julianday,irr_freq,irr_ph | ||
|
|
||
|
|
@@ -4482,6 +4482,21 @@ SUBROUTINE surface_driver( & | |
| ENDIF | ||
| ENDIF | ||
|
|
||
| IF (distributed_ahe_opt == 2) THEN | ||
| call cal_mon_day(julday, julyr, jmonth, jday) | ||
| ihour = (jmonth - 1) * 24 + MOD(INT(gmt + xtime / 60.0), 24) | ||
| !$OMP PARALLEL DO & | ||
| !$OMP PRIVATE ( ij, i, j, k ) | ||
| DO ij = 1, num_tiles | ||
| DO j = j_start(ij), j_end(ij) | ||
| DO i = i_start(ij), i_end(ij) | ||
| HFX(i, j) = HFX(i, j) + ahe(i, ihour, j) | ||
| END DO | ||
| END DO | ||
| END DO | ||
| !$OMP END PARALLEL DO | ||
| END IF | ||
|
|
||
| ENDIF run_param_if | ||
|
|
||
| END SUBROUTINE surface_driver | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.