Problem with Bulk_flux

Report or discuss software problems and other woes

Moderators: arango, robertson

Post Reply
Message
Author
User avatar
bhatt.vihang
Posts: 11
Joined: Thu Aug 19, 2010 12:51 pm
Location: Indian Institute of Science

Problem with Bulk_flux

#1 Unread post by bhatt.vihang »

Hi,

I was facing problem with computation of bulk fluxes over land masked region. They were generating NaNs as RH was masked out to be 0. The code

Code: Select all

          IF (RH.lt.2.0_r8) THEN                       !RH fraction
               cff=cff*RH                                 !Vapor pres (mb)
               Q(i)=0.62197_r8*(cff/(PairM-0.378_r8*cff)) !Spec hum (kg/kg)
          ELSE          !RH input was actually specific humidity in g/kg
            Q(i)=RH/1000.0_r8                          !Spec Hum (kg/kg)
          END IF
was modified as

Code: Select all

             IF (RH.lt.2.0_r8) THEN                       !RH fraction
# ifdef MASKING
            if (rmask(i,j).NE.0) then
# endif 
               cff=cff*RH                                 !Vapor pres (mb)
               Q(i)=0.62197_r8*(cff/(PairM-0.378_r8*cff)) !Spec hum (kg/kg)
# ifdef MASKING
            else
               Q(i)=rmask(i,j)
            endif
# endif
          ELSE          !RH input was actually specific humidity in g/kg
            Q(i)=RH/1000.0_r8                          !Spec Hum (kg/kg)
          END IF

This has stopped generting NaNs. Hope this helps.

User avatar
arango
Site Admin
Posts: 1350
Joined: Wed Feb 26, 2003 4:41 pm
Location: DMCS, Rutgers University
Contact:

Re: Problem with Bulk_flux

#2 Unread post by arango »

Why are you masking the surface air pressure?

User avatar
bhatt.vihang
Posts: 11
Joined: Thu Aug 19, 2010 12:51 pm
Location: Indian Institute of Science

Re: Problem with Bulk_flux

#3 Unread post by bhatt.vihang »

I use Pyroms to generate forcing fields that is automatically masking all fields over the land. I am still looking into how to undo this.

Post Reply