vic/drivers/shared_image/src/alloc_atmos.c
void
free_force(force_data_struct *force)
{
    extern option_struct options;

    if (force == NULL) {
        return;
    }

    free(force->air_temp);
    free(force->density);
    free(force->longwave);
    free(force->prec);
    free(force->pressure);
    free(force->shortwave);
    free(force->snowflag);
    free(force->vp);
    free(force->vpd);
    free(force->wind);
    if (options.LAKES) {
        free(force->channel_in);
    }
    if (options.CARBON) {
        free(force->Catm);
        free(force->coszen);
        free(force->fdir);
        free(force->par);
    }
}
/******************************************************************************
 * @brief    Free memory for the force data structure.
 *****************************************************************************/
@brief    Free memory for the force data structure.
@brief Free memory for the force data structure .
void
free_force(force_data_struct *force)
{
    extern option_struct options;
    if (force == NULL) {
        return;
    }
    free(force->air_temp);
    free(force->density);
    free(force->longwave);
    free(force->prec);
    free(force->pressure);
    free(force->shortwave);
    free(force->snowflag);
    free(force->vp);
    free(force->vpd);
    free(force->wind);
    if (options.LAKES) {
        free(force->channel_in);
    }
    if (options.CARBON) {
        free(force->Catm);
        free(force->coszen);
        free(force->fdir);
        free(force->par);
    }
}
void free_force ( force_data_struct * force ) { extern option_struct options ; if ( force == NULL ) { return ; } free ( force -> air_temp ) ; free ( force -> density ) ; free ( force -> longwave ) ; free ( force -> prec ) ; free ( force -> pressure ) ; free ( force -> shortwave ) ; free ( force -> snowflag ) ; free ( force -> vp ) ; free ( force -> vpd ) ; free ( force -> wind ) ; if ( options . LAKES ) { free ( force -> channel_in ) ; } if ( options . CARBON ) { free ( force -> Catm ) ; free ( force -> coszen ) ; free ( force -> fdir ) ; free ( force -> par ) ; } }
@brief    Free memory for the force data structure.
@brief Free memory for the force data structure .