HragN
New member
icloud is treated as a scalar in WRF, but I'd like to make it a 2-d vector that depends on LANDMASK.
In short, I'd like to turn icloud off (=0) over ocean, and leave icloud on (=1) over land.
I would appreciate any input on how to successfully and efficiently execute this task.
My current strategy is to:
1. Add a new variable inside phys/module_radiation_drive.F: INTEGER, ALLOCATABLE :: icloud_local
,
2. Allocate the new variable it: ALLOCATE(icloud_local(ims:ime,jms:jme))
3. Then populate it based on landmask:
DO j = jts, jte
DO i = its, ite
IF (xlmask(i,j) >= 0.5) THEN
icloud_local(i,j) = 1 ! Turn off cloud radiative effects over land
ELSE
icloud_local(i,j) = 0 ! Keep normal cloud radiative effects over ocean
END IF
END DO
END DO
4. Call icloud_local into the calls to RRTMG radiation routines (i.e., module_ra_rrtmg_lw and module_ra_rrtmg_sw)
But this is where I get into some trouble.
The RRTMG radiation routines call icloud to start loops since it is natively a scaler. Since I want icloud to be a 2-d vector, I would need to loop through the 2-d icloud_local variable before starting the loops, which I could imagine being computationally expensive.
Let me know what you all think.
In short, I'd like to turn icloud off (=0) over ocean, and leave icloud on (=1) over land.
I would appreciate any input on how to successfully and efficiently execute this task.
My current strategy is to:
1. Add a new variable inside phys/module_radiation_drive.F: INTEGER, ALLOCATABLE :: icloud_local
2. Allocate the new variable it: ALLOCATE(icloud_local(ims:ime,jms:jme))
3. Then populate it based on landmask:
DO j = jts, jte
DO i = its, ite
IF (xlmask(i,j) >= 0.5) THEN
icloud_local(i,j) = 1 ! Turn off cloud radiative effects over land
ELSE
icloud_local(i,j) = 0 ! Keep normal cloud radiative effects over ocean
END IF
END DO
END DO
4. Call icloud_local into the calls to RRTMG radiation routines (i.e., module_ra_rrtmg_lw and module_ra_rrtmg_sw)
But this is where I get into some trouble.
The RRTMG radiation routines call icloud to start loops since it is natively a scaler. Since I want icloud to be a 2-d vector, I would need to loop through the 2-d icloud_local variable before starting the loops, which I could imagine being computationally expensive.
Let me know what you all think.