Changeset 801 for trunk/LMDZ.MARS/libf


Ignore:
Timestamp:
Oct 5, 2012, 2:25:36 AM (12 years ago)
Author:
aslmd
Message:

LMDZ.MARS adapted icap trick to mesoscale modeling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/libf/phymars/albedocaps.F90

    r707 r801  
    1313#include"surfdat.h"
    1414#include"callkeys.h"
     15#ifdef MESOSCALE
     16#include"comgeomfi.h"
     17#endif
    1518
    1619! arguments:
     
    5154
    5255do ig=1,ngrid
     56#ifndef MESOSCALE
    5357  if (ig.gt.ngrid/2+1) then
     58#else
     59  if (lati(ig)*180./acos(-1.).lt.0.) then
     60#endif
    5461    icap=2 ! Southern hemisphere
    5562  else
     
    6471!      write(*,*) "albedocaps: call TES_icecap_albedo"
    6572!      write(*,*) "albedocaps: zls=",zls," ig=",ig
    66       call TES_icecap_albedo(zls,ig,psolaralb(ig,1))
     73      call TES_icecap_albedo(zls,ig,psolaralb(ig,1),icap)
    6774!      write(*,*) "albedocaps: psolaralb(ig,1)=",psolaralb(ig,1)
    6875      psolaralb(ig,2)=psolaralb(ig,1)
     
    8996
    9097!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    91 subroutine TES_icecap_albedo(zls,ig,alb)
     98subroutine TES_icecap_albedo(zls,ig,alb,icap)
    9299
    93100implicit none
     
    103110integer,intent(in) :: ig ! grid point index
    104111real,intent(out) :: alb ! (interpolated) TES ice albedo at that grid point
     112integer :: icap ! =1: Northern hemisphere =2: Southern hemisphere
    105113
    106114! local variables:
     
    118126real :: lond ! longitude, in degrees
    119127integer :: i
    120 integer :: icap ! =1: Northern hemisphere =2: Southern hemisphere
    121128
    122129! TES datasets: (hard coded fixed length/sizes; for now)
     
    231238endif ! of if firstcall
    232239
    233 ! 1. Identify hemisphere and encompassing latitudes
    234 if (ig.GT.ngridmx/2+1) then
    235   icap=2 ! Southern hemisphere
    236 else
    237   icap=1 ! Northern hemisphere
    238 endif
     240! 1. Identify encompassing latitudes
    239241
    240242! Check that latitude is such that there is TES data to use
Note: See TracChangeset for help on using the changeset viewer.