subroutine testconservmass2d(ngrid,surfmass) use comgeomfi_h implicit none !================================================================== ! Purpose ! ------- ! Test conservation of n2 mass ! ! Inputs ! ------ ! ngrid Number of vertical columns ! nlayer Number of layers ! pplev(ngrid,nlayer+1) Pressure levels ! surfmass ! ! Authors ! ------- ! Tanguy Bertrand 2015 ! !================================================================== #include "dimensions.h" #include "dimphys.h" #include "comcstfi.h" #include "surfdat.h" #include "comvert.h" #include "callkeys.h" #include "tracer.h" !----------------------------------------------------------------------- ! Arguments INTEGER ngrid REAL surfmass(ngrid) ! LOCAL VARIABLES INTEGER ig,iq ! OUTPUT REAL surfmasstot !----------------------------------------------------------------------- surfmasstot=0.0 do ig = 1, ngrid surfmasstot= surfmasstot + surfmass(ig)*area(ig) enddo surfmasstot = surfmasstot/totarea ! print*,'-------------------------------------------' print*,'Total mass surface : ',surfmasstot,' kg m-2' end subroutine testconservmass2d