Skip to content

fixing issues with ERA5 climate#78

Merged
cenlinhe merged 1 commit intoNCAR:developfrom
tslin2:develop
Jun 16, 2023
Merged

fixing issues with ERA5 climate#78
cenlinhe merged 1 commit intoNCAR:developfrom
tslin2:develop

Conversation

@tslin2
Copy link
Collaborator

@tslin2 tslin2 commented Jun 13, 2023

#56
Namelist Vtable, z changed to TERRAIN
call latlon_to_ij() don’t need to +360.0 for ERA5 data, if longitude is positive.

Copy link
Collaborator

@cenlinhe cenlinhe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fix to deal with ERA-5 looks good to me and I approve it.

@CharlesZheZhang
Copy link
Collaborator

Thanks Cenlin and Tzu-Shun. As we discussed this afternoon, I agree to merge this pull request to develop branch.

@cenlinhe cenlinhe merged commit 040ffe5 into NCAR:develop Jun 16, 2023
@tslin2
Copy link
Collaborator Author

tslin2 commented Sep 10, 2023

if geo longitude is negative, the longitude of precipitation needs to add 360 degree in the subroutine interp_rainfall_nearest_neighbor

call latlon_to_ij(datastruct%proj, geo_em%lat(ii,jj), geo_em%lon(ii,jj), x, y)

revise to

    if (forcing_type=="ERA5") then
       if (geo_em%lon(ii,jj) < 0) then
          call latlon_to_ij(datastruct%proj, geo_em%lat(ii,jj), geo_em%lon(ii,jj)+360.0, x, y)
       else
          call latlon_to_ij(datastruct%proj, geo_em%lat(ii,jj), geo_em%lon(ii,jj), x, y)
       endif
    else
       call latlon_to_ij(datastruct%proj, geo_em%lat(ii,jj), geo_em%lon(ii,jj), x, y)
    endif

@tslin2
Copy link
Collaborator Author

tslin2 commented Sep 19, 2023

Another issue with the soil thickness vertical interpolation
The problem is due to the var(:,:,k) in the following line

var(:,:,k) = (src(:,ktop,:)*fraction) + (src(:,kbottom,:)*(1.0-fraction))

changing to var(:,k,:) works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants