Output new meteo variables along trajectory
Posted: July 22nd, 2021, 1:10 pm
I'm modifying the Linux source code to output the U and V wind components as diagnostic variables along a trajectory using the setup flags tm_uwnd and tm_vwnd. The meteo data I'm using is from CESM, on a lat/lon grid in m/s. I have the trajectory output file successfully producing a new column for each of my new diagnostic variables, but most values are in the range +/- 0.003 with only a few getting up to order 0.01 (based on inspection of my input data in the region where my trajectories are (high latitudes, January, below 500m) I expect something on the order of 0.1 for U and 0.1-10 for V.). Hoping someone can tell me what I'm missing, or at least confirm if the issue is more likely with the source code modifications or with my input meteo files; I've summarized the modifications made so far below.
In library/hysplit/DEFMETO.INC
add to TYPE MARK:
increase dimensions of tmrk in TYPE ASET from 10 -> 12:
In library/hysplit/advmet.f
add calls to ADV3NT around line 359:
In library/hysplit/trjdsk.f
(optional) increase decimal precision of diagnostic output variables from F8.1 to F8.3:
In source/hymodelt.F
Define integers TM_UWND, TM_VWND
Read in TM_UWND and TM_VWND in NAMELIST/SETUP/
Set TM_UWND=0 and TM_VWND=0 in optional namelist configuration, before opening namelist file
Set flags in METO:
write new tm_* flags to TRAJ.CFG:
In library/hysplit/DEFMETO.INC
add to TYPE MARK:
Code: Select all
INTEGER :: uwnd ! zonal wind speed
INTEGER :: vwnd ! meridional wind speed
Code: Select all
REAL :: tmrk (12) ! trajectory endpoint meteo marker variable
add calls to ADV3NT around line 359:
Code: Select all
IF(METO%FLAG%UWND.GT.0)THEN
! zonal wind
CALL ADV3NT(U(:,:,:,K1),XP,YP,ZX,VAR1,GLOBAL,NXP,NYP)
CALL ADV3NT(U(:,:,:,K2),XP,YP,ZX,VAR2,GLOBAL,NXP,NYP)
METO%TMRK(METO%FLAG%UWND)=(VAR2-VAR1)*TF+VAR1
END IF
IF(METO%FLAG%VWND.GT.0)THEN
! meridional wind
CALL ADV3NT(V(:,:,:,K1),XP,YP,ZX,VAR1,GLOBAL,NXP,NYP)
CALL ADV3NT(V(:,:,:,K2),XP,YP,ZX,VAR2,GLOBAL,NXP,NYP)
METO%TMRK(METO%FLAG%VWND)=(VAR2-VAR1)*TF+VAR1
END IF
(optional) increase decimal precision of diagnostic output variables from F8.1 to F8.3:
Code: Select all
WRITE(KF11,'(8I6,F8.1,2F9.3,11(1X,F8.3))') &
Define integers TM_UWND, TM_VWND
Read in TM_UWND and TM_VWND in NAMELIST/SETUP/
Set TM_UWND=0 and TM_VWND=0 in optional namelist configuration, before opening namelist file
Set flags in METO:
Code: Select all
METO%FLAG%UWND=0
METO%FLAG%VWND=0
...
IF(TM_UWND.GT.0)THEN
NDIAG=NDIAG+1
LABEL(NDIAG)='UWIND'
METO%FLAG%UWND=NDIAG
END IF
IF(TM_VWND.GT.0)THEN
NDIAG=NDIAG+1
LABEL(NDIAG)='VWIND'
METO%FLAG%VWND=NDIAG
END IF
Code: Select all
WRITE(KF26,'(A,I1,A)')' tm_uwnd = ',tm_uwnd,','
WRITE(KF26,'(A,I1,A)')' tm_vwnd = ',tm_vwnd,','